RxSwiftUtilities 2.2.0

RxSwiftUtilities 2.2.0

Jesse FarlessFarshad Sheykhi 维护。



 
依赖项
RxSwift~> 5.1
RxCocoa~> 5.1
 

  • 作者
  • Jesse Farless

RxSwiftUtilities

CocoaPods Compatible Carthage Compatible Platform CI codecov

关于

为 RxSwift 提供有用的类和扩展,这些类和扩展不属于 RxSwift 核心部分。

使用方法

查看以下链接的文档,示例或示例应用程序文档

Activity Indicator

let signingIn = ActivityIndicator()

let signedIn = loginButtonTap.withLatestFrom(usernameAndPassword)
    .flatMapLatest { (username, password) in
        return API.signup(username, password: password)
            .trackActivity(signingIn)
    }
}

signingIn.asDriver()
    .drive(UIApplication.shared.rx.isNetworkActivityIndicatorVisible)
    .disposed(by: disposeBag)

双向绑定

(textField.rx.text <-> variable)
    .disposed(by: disposeBag)

示例应用

该仓库包含一个包含交互式示例的 示例应用

要使用示例应用

cd ExampleApp
pod install

使用 Xcode 打开位于 ExampleApp/ 的项目并构建/运行它。

需求

  • Xcode 11
  • Swift 5

安装

CocoaPods

使用 pod --version 测试:1.1.1

在你的 Podfile

use_frameworks!

target "YOUR_TARGET_NAME" do
  pod "RxSwiftUtilities"
end

替换 YOUR_TARGET_NAME,然后在同一目录下运行

pod install

Carthage

使用 carthage version 测试:0.18

将其添加到 Cartfile

github "RxSwiftCommunity/RxSwiftUtilities"

在相同目录下运行

carthage update

按照此处说明链接/嵌入框架。
除了链接 RxSwiftUtilities,您还需要链接 RxSwiftRxCocoa

贡献

始终欢迎帮助!

git clone [email protected]:RxSwiftCommunity/RxSwiftUtilities.git
cd RxSwiftUtilities

或使用您自己的分叉仓库。

carthage bootstrap

这是必要的,以便能够自行构建框架并运行测试。然而,如果您愿意,也可以在另一个项目中一起开发和构建。

在提交PR之前,请确保测试通过。