问题
Since I updated Reactive Cocoa (RAC 5)
for Swift 3.0
which needs Reactive Swift
to works, I don't find events methods like textField.rac_textSignal
on a UITextField
for example, or cell.rac_prepareForReuseSignal
for a UICollectionViewCell
.
I imported both frameworks, I think the problem is that they updated the frameworks and they changed the name of the methods. But I didn't find an updated documentation for Swift 3.0
.
I install Reactive Cocoa / Reactive Swift
as a submodule
in my project, not from Carthage, maybe the problem is coming from there ?
(Like that : https://github.com/ReactiveCocoa/ReactiveCocoa#getting-started)
Can someone tell me how to solve this ?
Reactive Swift : https://github.com/ReactiveCocoa/ReactiveSwift
Only have : rac_lifetime
.
Thanks.
回答1:
Some parts of the Obj-C API have been divided in another framework : ReactiveObjC.
I needed to install this framework to access these methods.
Solution :
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.
Please see the following discussion on the issue :
https://github.com/ReactiveCocoa/ReactiveCocoa/issues/3197
回答2:
Please note that ReactiveCocoa 5.0 had just released its first alpha version, which includes AppKit, Foundation and UIKit extensions without dependencies on ReactiveObjC.
https://github.com/ReactiveCocoa/ReactiveCocoa/releases/tag/5.0.0-alpha.1
来源:https://stackoverflow.com/questions/39697384/reactive-cocoa-reactive-swift-swift-3-0-missing-methods