gpt4 book ai didi

swift - Reactive Cocoa/Reactive Swift - Swift 3.0 缺少方法

转载 作者:可可西里 更新时间:2023-11-01 02:14:11 31 4
gpt4 key购买 nike

自从我为需要 Reactive SwiftSwift 3.0 更新了 Reactive Cocoa (RAC 5) 后,我找不到事件方法比如 UITextField 上的 textField.rac_textSignal,或者 UICollectionViewCell 上的 cell.rac_prepareForReuseSignal

我导入了两个框架,我认为问题在于他们更新了框架并更改了方法的名称。但是我没有找到 Swift 3.0 的更新文档。

我在我的项目中将 Reactive Cocoa/Reactive Swift 作为 子模块 安装,而不是来自 Carthage,也许问题出在这里?

(像那样:https://github.com/ReactiveCocoa/ReactiveCocoa#getting-started)

谁能告诉我如何解决这个问题?

响应式 Swift:https://github.com/ReactiveCocoa/ReactiveSwift

只有:rac_lifetime

谢谢。

最佳答案

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.

请参阅以下关于该问题的讨论:

https://github.com/ReactiveCocoa/ReactiveCocoa/issues/3197

关于swift - Reactive Cocoa/Reactive Swift - Swift 3.0 缺少方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39697384/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com