How do I access NSUserDefaults from several different views?
If we are using NSUserDefaults
to store a data, is it possible 开发者_JAVA百科to access this data from a different view of the same project?
You can access the same NSUserDefaults instance from anywhere in your code. Use
[NSUserDefaults standardUserDefaults];
to access it anywhere within your application.
精彩评论