• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to have KVC-compliant enum property in Swift 2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Best way to have KVC-compliant enum property in Swift 2? (From: Rick Mann <email@hidden>)
 >Re: Best way to have KVC-compliant enum property in Swift 2? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: iOS 8.4: Converting a URL into a PHAsset
  • Next by Date: Re: iOS 8.4: Converting a URL into a PHAsset
  • Previous by thread: Re: Best way to have KVC-compliant enum property in Swift 2?
  • Next by thread: iOS 8.4: Converting a URL into a PHAsset
  • Index(es):
    • Date
    • Thread