NSUserDefaults 数据的存取

[[NSUserDefaults standardUserDefaults]setObject:useridStr forKey:useridFile];  //
NSString *ttttt = [[NSUserDefaults standardUserDefaults]objectForKey:(NSString*)useridFile];  //

NSUserDefaults可以存储的数据类型包括:

NSData
NSString
NSNumber
NSDate
NSArray
NSDictionary

 

你可能感兴趣的:(NSUserDefaults)