Reputation: 9551
I want to store specific info before adding it to my UITableView
I am accessing the End Users addressbook and getting the
First Name
Last Name
Street Address
City
State
Zip
Then I am using MKReverseGeocoder to get the GPS Coordinates
So I need to store the data from the addressbook and pair it to the GPS Coordinates that I received.
Upvotes: 0
Views: 328
Reputation: 10005
You can do a NSDictionary
(use [NSMutableDictionary][1]
) and store it in the [NSUserDefaults][2]
.
save:
[[NSUserDefaults standardUserDefaults] setObject:yourDictionary forKey:@"AkeyToUseAgainShouldBeAConstant"];
load:
NSDictionary *yourDictionary = [[NSUserDefaults standardUserDefaults] objectForKey:@"AkeyToUseAgainShouldBeAConstant"];
if you need it mutable again (to change the content)
NSMutableDictionary *yourDictionaryMutable = [[[[NSUserDefaults standardUserDefaults] objectForKey:@"AkeyToUseAgainShouldBeAConstant"] mutableCopy] autorelease];
Upvotes: 1