Can't use Swift classes inside Objective-C

前端 未结 25 2041
野趣味
野趣味 2020-11-22 08:10

I try to integrate Swift code in my app.My app is written in Objective-C and I added a Swift class. I\'ve done everything described he

25条回答
  •  感情败类
    2020-11-22 08:17

    Make sure your project defines a module and you have given a name to the module. Then rebuild, and Xcode will create the -Swift.h header file and you will be able to import.

    You can set module definition and module name in your project settings.

提交回复
热议问题