现在我将 swift3 的 ReactiveCocoa 更新为 5(版本 4.2.2)。
但是没有用于 UIButton 的 api rac_signalForControlEvents(.TouchUpInside)
,我在以前的版本中使用它
有人知道吗?如何解决?
最佳答案
Obj-C API 的某些部分已被划分到另一个框架中:ReactiveObjC。
我需要安装这个框架来访问这些方法。
解决方案:
As stated in README (Objective-C and Swift section), those Objective-C API are splitted out to ReactiveObjC framework. You need to add https://github.com/ReactiveCocoa/ReactiveObjC as a submodule, link the framework, then import ReactiveObjC.
请参阅以下关于该问题的讨论:
关于ios - RAC5 中缺少 rac_signalForControlEvents,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39642020/