-
oc调用Swift,import *-Swift.h后,无法调用Swift的类方法
Swift的对应类名前增加 @objcMembers(在class 类名上方)
-
Swift调用oc,oc的pch文件不可用
在项目target 的 build settings里,找到prefix header。添加pch的位置,例如$(SRCROOT)/Common/tool/Prefix.pch
Swift的对应类名前增加 @objcMembers(在class 类名上方)
在项目target 的 build settings里,找到prefix header。添加pch的位置,例如$(SRCROOT)/Common/tool/Prefix.pch
本文标题:oc和swift混编 常见问题
本文链接:https://www.haomeiwen.com/subject/uvkomctx.html
网友评论