How to erase an object saved with NSUserDefaults from disk
Let's say I saved data to disk like this:
[[NSUserDefaults standardUserDefaults] setObject:[N开发者_如何学编程SKeyedArchiver archivedDataWithRootObject:theArray] forKey:@"savedArray"];
How can I erase that from disk?
Try this.
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"savedArray"];
精彩评论