Skip to content

Instantly share code, notes, and snippets.

@Kentzo
Created May 23, 2019 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kentzo/f79e667304fbf07d03006b93e386c1fd to your computer and use it in GitHub Desktop.
Save Kentzo/f79e667304fbf07d03006b93e386c1fd to your computer and use it in GitHub Desktop.
NS_SWIFT_NAME is recursive
@interface Sandwich: NSObject
@end
NS_SWIFT_NAME(Sandwich.Preferences)
@interface SandwichPreferences: NSObject
@end
typedef NS_ENUM(NSInteger, SandwichBreadType) {
} NS_SWIFT_NAME(SandwichPreferences.BreadType);
var sandwich: Sandwich?
var preferences: Sandwich.Preferences?
var breadType: Sandwich.Preferences.BreadType?
@interface SRRecorderControlStyle: NSObject
@end
@interface SRRecorderControlStyleComponents: NSObject
@end
typedef NS_ENUM(NSUInteger, SRRecorderControlStyleComponentsAppearance) {};
var style: RecorderControlStyle?
var components: RecorderControlStyle.Components?
var appearance: RecorderControlStyle.Components.Appearance?
NS_SWIFT_NAME(RecorderControlStyle)
@interface SRRecorderControlStyle: NSObject
@end
NS_SWIFT_NAME(SRRecorderControlStyle.Components)
// NS_SWIFT_NAME(RecorderControlStyle.Components) also works!
@interface SRRecorderControlStyleComponents: NSObject
@end
typedef NS_ENUM(NSUInteger, SRRecorderControlStyleComponentsAppearance)
{} NS_SWIFT_NAME(SRRecorderControlStyleComponents.Appearance);
NS_SWIFT_NAME(RecorderControlStyle)
@interface SRRecorderControlStyle: NSObject
@end
NS_SWIFT_NAME(RecorderControlStyle.Components)
@interface SRRecorderControlStyleComponents: NSObject
@end
typedef NS_ENUM(NSUInteger, SRRecorderControlStyleComponentsAppearance)
{} NS_SWIFT_NAME(RecorderControlStyle.Components.Appearance);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment