I want to draw something using saved plist
let path = NSBundle.mainBundle().pathForResource("draw_array", ofType: "plist");
var dict = NSDictionary(contentsOfFile: path!);
var lastPoint: CGPoint!;
for (myKey,myValue) in dict {
var row = myValue as NSDictionary;
for (index, (key, value)) in enumerate(row) {
lastPoint = CGPoint(x: dict[1]!["start"]["x"] as Int?, y: dict[1]!["start"]["y"] as Int?);
println("index: (index) key: (key) value: (value)")
}
}
I cant get the individual x and y values, and keep geting errors
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…