开发者

iPhone applicationDidEnterBackground: method to save user data and any state information

What is the best approach to save any application state information or user data information before application goes to b开发者_StackOverflow中文版ackground?

Say for example I have one application level variable called "Authorised". Where should I save this information so I can get it back if it is purged by memory management.

Regards,

Atif


Well that depends a bit how big and complex the data is you want to save. If it is just a small amount of data representing the state, I would have a look at NSUserDefaults.

Have a look at this question as well:How to show the same view when the app is reopened

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜