How to use NSUserDefaults
- instance
NSUserDefaults *d = [NSUserDefaults standardUserDefaults];
- setXXX type --- for *** Write ***
[d setInteger:20 forKey:@"intKey"];
- getXXX type --- for *** Read ***
NSInteger str = [d integerForKey:@"intKey"];
- 同步 synchronize
[d synchronize];