活性可可/活性Swift - Swift 3.0缺失方法

时间:2022-05-08 08:08:32

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.

因为我为Swift 3.0更新了反应式Cocoa (RAC 5),它需要反应性的Swift来工作,所以我找不到像textField这样的事件方法。例如,UITextField上的rac_textSignal或cell。rac_prepareForReuseSignal 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.

我导入了这两个框架,我认为问题是它们更新了框架并且改变了方法的名称。但是我没有找到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 ?

我在我的项目中安装了反应性Cocoa /反应性Swift作为子模块,而不是Carthage,也许问题是来自那里?

(Like that : https://github.com/ReactiveCocoa/ReactiveCocoa#getting-started)

(如:https://github.com/ReactiveCocoa/ReactiveCocoa开始)

Can someone tell me how to solve this ?

谁能告诉我怎么解决这个问题吗?

Reactive Swift : https://github.com/ReactiveCocoa/ReactiveSwift

反应迅速:https://github.com/ReactiveCocoa/ReactiveSwift

Only have : rac_lifetime.

只有:rac_lifetime。

Thanks.

谢谢。

2 个解决方案

#1


1  

Some parts of the Obj-C API have been divided in another framework : ReactiveObjC.

object - c API的某些部分被划分为另一个框架: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.

如README (Objective-C和Swift部分)中所述,这些Objective-C API被分割为ReactiveObjC框架。您需要添加https://github.com/ReactiveCocoa/ReactiveObjC作为子模块,链接框架,然后导入ReactiveObjC。

Please see the following discussion on the issue :

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

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

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

#2


0  

Please note that ReactiveCocoa 5.0 had just released its first alpha version, which includes AppKit, Foundation and UIKit extensions without dependencies on ReactiveObjC.

请注意,ReactiveCocoa 5.0刚刚发布了它的第一个alpha版本,其中包括AppKit、Foundation和UIKit扩展,不依赖于ReactiveObjC。

https://github.com/ReactiveCocoa/ReactiveCocoa/releases/tag/5.0.0-alpha.1

https://github.com/ReactiveCocoa/ReactiveCocoa/releases/tag/5.0.0-alpha.1

#1


1  

Some parts of the Obj-C API have been divided in another framework : ReactiveObjC.

object - c API的某些部分被划分为另一个框架: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.

如README (Objective-C和Swift部分)中所述,这些Objective-C API被分割为ReactiveObjC框架。您需要添加https://github.com/ReactiveCocoa/ReactiveObjC作为子模块,链接框架,然后导入ReactiveObjC。

Please see the following discussion on the issue :

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

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

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

#2


0  

Please note that ReactiveCocoa 5.0 had just released its first alpha version, which includes AppKit, Foundation and UIKit extensions without dependencies on ReactiveObjC.

请注意,ReactiveCocoa 5.0刚刚发布了它的第一个alpha版本,其中包括AppKit、Foundation和UIKit扩展,不依赖于ReactiveObjC。

https://github.com/ReactiveCocoa/ReactiveCocoa/releases/tag/5.0.0-alpha.1

https://github.com/ReactiveCocoa/ReactiveCocoa/releases/tag/5.0.0-alpha.1