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.
我看过很多文章解释如何从 Swift 调用 C 函数,但我想探索相反的(如果可能的话),从 C 调用 Swift 函数。
我已经看到了说明 objC 中的 Swift 函数的示例,但这些并没有让我更接近我的目标。甚至支持此任务吗?
从 C 代码调用 Swift 代码的唯一受支持的方法是在两者之间使用 Objective-C。
NSInvocation这并不是说这完全不可能,但是有人必须为没有精确 C 表示的对象想出一个类似- 的实用程序和包装器。
NSInvocation