• 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: Aggravation trying to implement NSValueTransformer subclasses in Swift
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Aggravation trying to implement NSValueTransformer subclasses in Swift (From: William Squires <email@hidden>)

  • Prev by Date: Re: How to draw a NSView on top of a WebView and don't get overriden trying
  • Next by Date: Re: Aggravation trying to implement NSValueTransformer subclasses in Swift
  • Previous by thread: Aggravation trying to implement NSValueTransformer subclasses in Swift
  • Next by thread: Re: Aggravation trying to implement NSValueTransformer subclasses in Swift
  • Index(es):
    • Date
    • Thread