[[NSUserDefaults standardUserDefaults]setObject:useridStr forKey:useridFile]; //存 NSString *ttttt = [[NSUserDefaults standardUserDefaults]objectForKey:(NSString*)useridFile]; //取 NSUserDefaults可以存储的数据类型包括: NSData NSString NSNumber NSDate NSArray NSDictionary