Property List (plist)
CoreData
- - (void)applicationDidEnterBackground:(UIApplication *)application
- {
- NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
- [userDefault setObject:@"白彼得" forKey:@"name"];
- [userDefault synchronize];
- }
- - (void)applicationWillEnterForeground:(UIApplication *)application
- {
- NSString *name = [[NSUserDefaults standardUserDefaults] objectForKey:@"name"];
- NSLog(@"name %@", name);
- }
.
No comments:
Post a Comment