使用RxSwift编译时出错

问题描述 投票:0回答:2

我正在尝试将RxSwift添加到我的项目中。将RxSwift和RxCocoa添加到我的Podfile中,但是当我编译时出现此错误:

试过另一个空项目,一切正常。找不到导致这种情况的原因。

编辑:

似乎它无法构建Rx-Cocoa。不知道为什么。

rx-swift
2个回答
1
投票

不要使用self.text,这是错的,你可以访问通过Base属性扩展的base类。

在这种情况下,base财产将是UITextField

extension Reactive where Base: UITextField {

    public var textInput: TextInput<Base> {
        return TextInput(base: base, text: base.text)
    }
}

0
投票
import Foundation
import RxSwift
import RxCocoa

//code insert here!!
© www.soinside.com 2019 - 2024. All rights reserved.