开发者

how to store and retrieve integer value in nsuser defaults?

I am use the开发者_C百科 segment control and store state of segment value segment control is use for speed type set in speedometer application.


Tried this?

[[NSUserDefaults standardUserDefaults] setInteger:yourInteger forKey:@"your key"];

And of course you can get the integer value back using:

[[NSUserDefaults standardUserDefaults] integerForKey:@"your key"];


you can use this tutorial for better understanding of NSUserdDefaults to store integer and string Value

http://mobile.tutsplus.com/tutorials/iphone/nsuserdefaults_iphone-sdk/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜