Closed. This question needs to be more focused。它当前不接受答案。
                            
                        
                    
                
                            
                                
                
                        
                            
                        
                    
                        
                            想改善这个问题吗?更新问题,使其仅通过editing this post专注于一个问题。
                        
                        4年前关闭。
                                                                                            
                
        
是否可以在混合语言项目中使用外部Objective-C框架?
如果是,那么如何在混合语言项目中使用它?

最佳答案

其实我知道了
您需要在为swift文件创建的桥接头文件中添加import语句,该文件头的名称可能类似于[ProjectName] -Swift.h
那么您的[ProjectName] -Swift.h文件将类似于

//
//  Use this file to import your target's public headers that you would like to expose to Swift.
//

    #import <FrameworkName>       // for framework
    #import "File Name"           // for file

09-05 02:33