用法:为类和代理重命名时它作为一个前缀,其他类型(属性、枚举、别名)时作为后缀
NS_SWIFT_NAME(Sandwich.Preferences)
@interface SandwichPreferences : NSObject
@property BOOL includesCrust NS_SWIFT_NAME(isCrusty);
@end
@interface Sandwich : NSObject
@end
在Swift调用重命名的类
var preferences = Sandwich.Preferences()
preferences.isCrusty = true
为枚举重命名
typedef NS_ENUM(NSInteger, SandwichBreadType) {
brioche, pumpernickel, pretzel, focaccia
} NS_SWIFT_NAME(SandwichPreferences.BreadType);