swift - Nested dictionary strange behavior -


I want to map data to

code:

  Class statistics {var maps: [NSDISIS] INIT () {SELMMAX = [["map": [["X": -0.5, "Y": -0.5]], "color": UIcolor.reader () ["Map": ["X": 0, "Y": 0], ["X": 0, "Y": -1], ["X": -1, "Y": 0], [ "[X]", "Y": -0.5], ["X": -1, "Y": -1]], "color": UIColor.blueColor ()], ["map": [ This code is valid, but I have a 1 in this dictionary: 1, "Y": -0.5]], "Color": UIColor.yellowColor ()]]}}  

Add more data Do not want to:

  ["map": [["x": -1, "y": -0.5], ["x": 0.5, "Y": - 0.5], ["X": -0.5, "Y": -0.5]], "Color": UIColor.ScyanColor ()]  

And now I found the following error:

But for the X in the previous version - 0.5 is substituted 0.5. It is valid then "again"

  ["map": [["x": -1, "y": -0.5], ["x": 0.5, "y": -0.5], ["X": 0.5, "y": -0.5]], "color": UIColor.cyancolor ()]  

Used to be? Anyone help

Fast compiler knows issues with such big statements like your array phase Improve the two-phase:

  self.maps.append (["map": [["x": -0.5, "y": -0.5]], "color" : ["X": 0, "y": -1], [["map": [["x": 0, "y": 0], [i.icolor.redColor ()] "X": -1, "Y": 0], ["X": -1, "Y": -1]], "color": UIColor.blueColor ()]) ...  < / Pre> 

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -