I have a question about NSUserDefault. Currently, i wanna write a function which save the favorite school into a list.
I have school name and school Id. So each time I save, school name + school id will be 1 dictionary object.
Then I save into NSUserDefault base on the id as key. I want to know the number of objects I saved into NSUserDefault. Or How can I get all of the objects out of NSUserDEfault since each of my key is different. Please help me out. below is my code:
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
NSMutableDictionary *schools = [[NSMutableDictionary alloc] init];
[schools setObject:schoolName forKey:kSchoolName];
[schools setObject:schoolID forKey:kSchoolID];
[userDefault setObject:schools forKey:schoolID];