清理所有NSUserDefaults

NSUserDefaults *defatluts = [NSUserDefaults standardUserDefaults];

NSDictionary *dictionary = [defatluts dictionaryRepresentation];

for(NSString *key in [dictionary allKeys]){

[defatluts removeObjectForKey:key];

[defatluts synchronize];

}

你可能感兴趣的:(清理所有NSUserDefaults)