On Oct 17, 2014, at 09:59 , Kevin Meaney <k...@yvs.eu.com> wrote:
> 
> I got the assigning to a property working when that property was declared as 
> part of the class, but not when it has been declared in the optional section 
> of a protocol. So I was able to duplicate what you did Roland. But no matter 
> what I try, documentation I read I can't make it work when the property is 
> declared in the protocol.

Presumably, the issue is that Swift makes assumptions about the possibility of 
a nil value when translating Obj-C frameworks types in a header. I believe that 
trying to guess the Swift translation from the Obj-C declaration will just 
drive you into madness. What you need to do instead is examine the translated 
declaration. Try Command-clicking on the protocol name in the place where you 
declare conformance, and you should see the translation. Then mimic the block 
type you see there.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to