开发者

NSUserDefaults reset [duplicate]

This question already has answers here: 开发者_StackOverflow社区 Closed 11 years ago.

Possible Duplicate:

How can I reset the NSUserDefaults data in the iPhone simulator?

Can we reset NSUserDefaults for all the keys at the same time? Right now I reset for individual keys. So if there is a way to do that in a single go please tell me.

Thanks


Here is how to do it without looping over all values and removing them.

NSString *domainName = [[NSBundle mainBundle] bundleIdentifier];
[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:domainName];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜