is there any methods like cookies in iphone
hi i am new to iphone development. i need to store a buttontag value temporarily and开发者_C百科 use it in another view is there any method to do this pls help me
Safari for iPhone supports cookies as every other browsers does. If you refer to a real objective-c coded app you might have a look at the NSUserDefauls and their related documentation in the SDK. These allow you to easily store and retrieve simple data.
Just a quick example here:
[[NSUserDefaults standardUserDefaults] setBool:saveUsername forKey:@"saveUsername"];
[[NSUserDefaults standardUserDefaults] setInteger:tabIndex forKey:@"startupTab"];
精彩评论