iDevGames Forums
Newbie here.. plist help pls!!! - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: iPhone, iPad & iPod Game Development (/forum-11.html)
+--- Thread: Newbie here.. plist help pls!!! (/thread-10670.html)



Newbie here.. plist help pls!!! - zaffryn - Jul 15, 2013 08:29 PM

How do you populate several labels from a plist file? Lets say i have 3 labels, name/number/description, and my plist has 1 item with 3 subitems. How do I display those 3 subitems in the labels.

Thank you


RE: Newbie here.. plist help pls!!! - OneSadCookie - Jul 16, 2013 06:15 PM

Code:
id plist = [NSDictionary dictionaryWithContentsOfFile:@“path/to/plist”];
[nameField setStringValue:plist[@“name”]];
[numberField setDoubleValue:[plist[@“number”] doubleValue]];
[descriptionField setStringValue:plist[@“description”]];

or something. you didn’t provide any useful information.