Basically I have an NSMutableArray of NSDictionaries stored to NSUserDefaults.
I have implemented tableview into my app but I am not sure how to display the individual values. I know that I am not providing much information (such as the keys I used) but could anyone give me a basic example on how access the values stored in NSDictionaries?
The code below doesn’t work obviously, but if it were just a string it would be accessible in this way:
cell.textLabel.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"parked locations"];
If you stored mutable arrays in, you can access the
NSMutableArraywith the key@"parked locations":Each element of that array is a
NSDictionaryyou access like that :Finally inside each dictionary, access values like, for example
NSString:As
NSUserDefaultscan store objects of type :NSData,NSString,NSNumber,NSDate,NSArray, orNSDictionary, yes, if it were just a string, you could access it like you wrote.You will find more information in Collections Programming Topics and User Defaults Programming Topics