Re: Best way to have KVC-compliant enum property in Swift 2?
Re: Best way to have KVC-compliant enum property in Swift 2?
- Subject: Re: Best way to have KVC-compliant enum property in Swift 2?
- From: Rick Mann <email@hidden>
- Date: Wed, 29 Jul 2015 10:06:48 -0700
> On Jul 28, 2015, at 19:38 , Quincey Morris <email@hidden> wrote:
>
> I suspect that downloadState will never need to be set via KVC**, or from Obj-C code, in which case there’s a slightly simpler solution than Charles’ suggestion. You can have 2 properties, one of which is an enum, and other is an immutable Int that’s observable, whose value is maintained via a simple didSet accessor on the enum property.
Thanks, Quincey, that's pretty much what I want. My view observes these properties to know when to update.
Thanks to Charles, too.
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden