开发者

How to get the view that is currently being displayed as an NSString?

I need to get the name of the view the user is currently viewing as an NSString, in order to save it so that I can return the user to this view if they exit my app. As of now, if a user exits my app on "View4" for instance my app will return them to "View1" if they launch it even immediately afterwards. P.S. I know this is possible because many apps, such as tap tap revenge and angry birds do this. You can quit at any time and return, and the view and e开发者_如何转开发verything you were at will be saved.


Save the view name using NSUserDefaults. Then, when you app launches, try to retrieve the name from user defaults.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜