Re: Property in class mirrored to user defaults

2017-06-19 Thread Alex Zavatone
As mentioned, there is NSUserDefaults. I think that there is a better way that is pretty much built in, but one that we often ignore. NSCoding. This is what it does. Matt Thompson has a nice write up on this here (in Objective-C and Swift), with a critical observation at the end of the compa

Re: Property in class mirrored to user defaults

2017-06-16 Thread Jonathan Taylor
Thankyou Charles and Keary for your replies. I somehow hadn't thought of using NSDefaults as backing for the properties. There are a lot of properties involved, but with a macro or something I should be able to set it up without a massive code bloat. Will give that a go. Cheers Jonny On 12 Jun

Re: Property in class mirrored to user defaults

2017-06-12 Thread Charles Srstka
> On Jun 12, 2017, at 4:04 AM, Jonathan Taylor > wrote: > > Hi all, > > This feels like a very basic question, but one that I have not had any luck > searching for (maybe I am using the wrong terms?). > > At the moment I have properties in a (singleton) class that are bound to UI > elements.