How to reference Swift enum in Objective-C Header

前端 未结 7 2054
星月不相逢
星月不相逢 2021-01-31 19:38

Is there a way to reference a Swift enum from an Objective-C header? If you want to see Swift classes in the Objective-C header you can use

@objc class Foo
         


        
7条回答
  •  伪装坚强ぢ
    2021-01-31 20:14

    In Mixed OBJC - Swift projects the best way to have enums work in both types of classes will be to define the enum in an OBJC header and not in a swift class. swift enums can't be used in OBJC header files taken from the answer here

提交回复
热议问题