NSUserDefaults无法保存数据
需要 synchronize一下
If you terminate your app by pressing the home button (in the Simulator or on the device), your User Defaults will get saved.
If you terminate your app by pressing "Stop" in Xcode (in the Simulator or on the device), your User Defaults might get saved, but there's a good chance they won't. NSUserDefaults persists any changes periodically, and if you terminate the process before they've been persisted, they'll be gone. You can force the save by calling:
[[NSUserDefaults standardUserDefaults] synchronize];