In my project I have a settings class with properties with custom setters that access
@property NSString *name
I found your question very interesting and I said to myself "Challenge accepted!".
I've created this project on Github.
Basically, all you have to do is subclass the VBSettings class and then declare de properties, like this:
@interface MySettings : VBSettings @property (strong, nonatomic) NSString *hello; @end
The value of "hello" will be saved to NSUserDefaults with the key "hello". Example of usage:
MySettings settings = [[MySettings alloc] init]; settings.hello = "World!"; //The value is saved in NSUserDefaults NSLog(@"%@", settings.hello); //The value is restored from NSUserDefaults.