How can I import Swift code to Objective-C?

前端 未结 15 2618
南方客
南方客 2020-11-22 02:52

I have written a library in Swift and I wasn\'t able to import it to my current project, written in Objective-C.

Are there any ways to import it?

#i         


        
15条回答
  •  日久生厌
    2020-11-22 03:24

    If you're using Cocoapods and trying to use a Swift pod in an ObjC project you can simply do the following:

    @import ;

提交回复
热议问题