Re: Aggravation trying to implement NSValueTransformer subclasses in Swift
Re: Aggravation trying to implement NSValueTransformer subclasses in Swift
- Subject: Re: Aggravation trying to implement NSValueTransformer subclasses in Swift
- From: Jens Alfke <email@hidden>
- Date: Tue, 12 May 2015 15:33:56 -0700
> On May 12, 2015, at 2:29 PM, William Squires <email@hidden> wrote:
>
> but the example in the documentation is in ObjC, not Swift, and refers to id, not to "Bool"s or "String"s. Hints, anyone?
‘id’ in Obj-C is ‘AnyObject’ in Swift. You’ll need to use the “as” or “as?” operator to type-cast it to NSNumber or NSString. You should also read Apple’s book on using Swift with Objective-C, because there’s a lot more to know before you get started.
—Jens
_______________________________________________
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