//保持到本地数据
NSArray *array=@[@"234",@"sdfe"];
NSUserDefaults *userDefault=[NSUserDefaults standardUserDefaults];
[userDefault setInteger:123 forKey:@"number"];
[userDefault setObject:array forKey:@"array"];
[userDefault synchronize];
//获取保持到数据
NSUserDefaults *userdefault2=[NSUserDefaults standardUserDefaults];
NSInteger number2=[userdefault2 integerForKey:@"number"];
NSArray *array2=[userdefault2 objectForKey:@"array"];
NSLog(@"number=%d,array=%@",number2,array2);