Loop through a dictionary in swift -


I'm trying to replicate the loop in Objective-C but an 'object' is not found ' A member with the name 'Generator type': For (in the NSString * file [dict objectForKey: @ "files"]) {NSString * content = [[Source StringBapensing Path Companent: @ "Content "] String = source.stringByAppendingPathComponent (" content ") Dict.objectForKey ("files") for .stringByAppendingPathComponent (file)}

I have tried defining a holder variable. Can anyone see what I am doing, please?

This is not a loop through a dictionary. It's a looping, though one dictionary key is the array stored in one of the key. For example, if an array of your strings was in the form of the key of your dictionary.

  if arr arr = "[files"] [string] {for fil e in arr {}}   

If you only select dictionary If you want to loop through, then it is possible in Swift, and this can be done:

 for  (key, value) in dict {println ("key - \ ( Key) and value is - \ (value) ")}    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -