Skip to content

liangdahong/RxSVP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  ____         ______     ______
 |  _ \ __  __/ ___\ \   / /  _ \
 | |_) |\ \/ /\___ \\ \ / /| |_) |
 |  _ <  >  <  ___) |\ V / |  __/
 |_| \_\/_/\_\|____/  \_/  |_|

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

RxSVP is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'RxSVP'
textField.rx.text.orEmpty
    .filter { $0.count > 5 }
    .map { _ in () }
    .bind(to: SVProgressHUD.rx.info(status: "密码不可以大于 5 位"))
    .disposed(by: rx.disposeBag)

loginButton.rx.tap
    .bind(to: SVProgressHUD.rx.loading(status: "登录中..."))
    .disposed(by: rx.disposeBag)

infoButton.rx.tap
    .map { _ in "请登录" }
    .bind(to: SVProgressHUD.rx.info)
    .disposed(by: rx.disposeBag)

errorButton.rx.tap
    .map { _ in "网络错误" }
    .bind(to: SVProgressHUD.rx.error)
    .disposed(by: rx.disposeBag)

succesButton.rx.tap
    .bind(to: SVProgressHUD.rx.success(status: "登录成功"))
    .disposed(by: rx.disposeBag)

dismissButton.rx.tap
    .bind(to: SVProgressHUD.rx.dismiss)
    .disposed(by: rx.disposeBag)

Author

[email protected]

License

RxSVP is available under the MIT license. See the LICENSE file for more info.