Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Weex ios sdk。对于公开 js 方法,有一个 pragma
#define WX_EXPORT_METHOD(method)
但是这个编译指示只能在目标 C 文件中访问。我需要在 swift 文件中使用它。
有什么办法吗?
我认为您工作的解决方案是创建 Objective-c 桥接头,如下所示:
https://github.com/apache/incubator-weex-site/blob/master/source/cn/guide/extend-module-using-swift.md