cocos2d iphone - How to read a plist data and get int from it? -


currently using cocos2d. have plist data name myplist.plist. inside plist integers.. how read data , int in it?

nsstring *path = [[nsbundle mainbundle] bundlepath]; nsstring *dictionarypath = [path stringbyappendingpathcomponent:@"myplist.plist"];  nsdictionary *integerdictionary = [[nsdictionary alloc] initwithcontentsoffile:dictionarypath];  int myinteger1 = [[integerdictionary objectforkey:@"integer1"] intvalue]; int myinteger2 = [[integerdictionary objectforkey:@"integer2"] intvalue]; // etc etc 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -