NSUserDefaults: How to set up NSDictionary with NSString keys, and BOOL values? -


i want add nsdictionary item nsuserdefaults settings bundle, not sure how structure item inside root.plist file. dictionary needs contain nsstrings keys, , boolean values.

at moment item inside .plist looks following pseudo code:

item 0 -- dictionary     key -- string -- values    values -- dictionary         item 0 -- string  -- speed //key         item 1 -- boolean -- no    //value        etc....  

is correct? in order read boolean value in program want execute following code.

bool speedvalue = [[[nsuserdefaults standarduserdefaults]  objectforkey:@"values"] objectforkey:@"speed"];  

almost. bool isn't object, you'll need out via nsnumber or something.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -