> On Oct 21, 2014, at 11:38 AM, Rick Mann <rm...@latencyzero.com> wrote: > >> On Oct 21, 2014, at 09:18 , Raglan T. Tiger <r...@crusaderrabbit.net> wrote: >> >>> On Oct 20, 2014, at 10:53 PM, Rick Mann <rm...@latencyzero.com> wrote: >>> >>> Sigh, I figured it out. Not only do you have to use NS_ENUM, the >>> enumeration members MUST begin with the name of the enumeration. >> >> Example please ... I feel unfulfilled. > > It's precisely as shown here (if not spelled out in words), under > "Enumerations": > > https://developer.apple.com/library/ios/documentation/swift/conceptual/buildingcocoaapps/InteractingWithCAPIs.html > > typedef NS_ENUM(NSInteger, UITableViewCellStyle) > { > UITableViewCellStyleDefault, > UITableViewCellStyleValue1, > UITableViewCellStyleValue2, > UITableViewCellStyleSubtitle > };
NS_ENUM or NS_OPTIONS is required for Swift to import it. The name prefix is not required. If I recall correctly, the Swift importer has some heuristics to omit any shared prefix from the Swift names, but if there is no prefix then the enumerators are imported unchanged. -- Greg Parker gpar...@apple.com Runtime Wrangler _______________________________________________ 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