//方法一
NSString*appDomain = [[NSBundlemainBundle]bundleIdentifier];
[[NSUserDefaultsstandardUserDefaults]removePersistentDomainForName:appDomain];
//方法二
- (void)resetDefaults {
NSUserDefaults* defs = [NSUserDefaultsstandardUserDefaults];
NSDictionary* dict = [defsdictionaryRepresentation];
for(idkeyindict) {
[defsremoveObjectForKey:key];
}
[defssynchronize];
}