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/
精彩评论