• 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: Translating KVO-ed property to Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Translating KVO-ed property to Swift


  • Subject: Re: Translating KVO-ed property to Swift
  • From: Jean-Daniel <email@hidden>
  • Date: Mon, 17 Apr 2017 14:40:35 +0200

> Le 17 avr. 2017 à 10:52, Quincey Morris <email@hidden> a écrit :
>
> On Apr 17, 2017, at 01:43 , Jean-Daniel <email@hidden <mailto:email@hidden>> wrote:
>>
>> var version: String? {
>
> A slight correction: this declaration actually must be:
>
>> dynamic var version: String? {
>
>
> otherwise KVO isn’t guaranteed to work in Swift.

This is a good practice, but I don’t think this is required for computed property, especially if you take care of willChange/didChange manually, as the OP does.


_______________________________________________

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

  • Follow-Ups:
    • Re: Translating KVO-ed property to Swift
      • From: Charles Srstka <email@hidden>
References: 
 >Translating KVO-ed property to Swift (From: Rick Mann <email@hidden>)
 >Re: Translating KVO-ed property to Swift (From: Jean-Daniel <email@hidden>)
 >Re: Translating KVO-ed property to Swift (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Translating KVO-ed property to Swift
  • Next by Date: Re: Help Indexing
  • Previous by thread: Re: Translating KVO-ed property to Swift
  • Next by thread: Re: Translating KVO-ed property to Swift
  • Index(es):
    • Date
    • Thread