Objective-C
Modern way to register NSUserDefaults
Here is a modern way to register user defaults. It uses dispatch_once to ensure the registration only happens once and performs it lazily on the first access. Keeps your defaults all on the one place. Also it is implemented as a global block in the class. NSInteger (^countBeforeAlerting)(void) = ^NSInteger(void) Read more…