NSUserDefaults

Want to store light information such as user defaults, current highscore fast and easy? Just use NSUserDefault.

Example: Adding the current highscore:
[[NSUserDefaults standardUserDefaults] setInteger:scoreValue forKey:@"score"];

Example: Get the current highscore
[[NSUserDefaults standardUserDefaults] integerForKey:@"score"]];

Except primitives it works for NSData, NSString, NSNumber, NSDate, NSArray and NSDictionary

NSUserDefaults

Want to store light information such as user defaults, current highscore fast and easy? Just use NSUserDefault.

Example: Adding the current highscore:
[[NSUserDefaults standardUserDefaults] setInteger:scoreValue forKey:@"score"];

Example: Get the current highscore
[[NSUserDefaults standardUserDefaults] integerForKey:@"score"]];

Except primitives it works for NSData, NSString, NSNumber, NSDate, NSArray and NSDictionary

Posted 2 years ago 1 note

Notes:

  1. signar posted this

About:

Following: