https://github.com/liangdahong/rxsvp
RxSwift bindings for SVProgressHUD API.
https://github.com/liangdahong/rxsvp
rxswift rxswift-extensions svprogresshud svprogresshud-rx svprogresshud-rxswift
Last synced: 12 months ago
JSON representation
RxSwift bindings for SVProgressHUD API.
- Host: GitHub
- URL: https://github.com/liangdahong/rxsvp
- Owner: liangdahong
- License: mit
- Created: 2021-04-24T15:57:48.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-07-09T15:20:01.000Z (almost 5 years ago)
- Last Synced: 2025-07-04T23:23:03.230Z (12 months ago)
- Topics: rxswift, rxswift-extensions, svprogresshud, svprogresshud-rx, svprogresshud-rxswift
- Language: Swift
- Homepage:
- Size: 401 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```js
____ ______ ______
| _ \ __ __/ ___\ \ / / _ \
| |_) |\ \/ /\___ \\ \ / /| |_) |
| _ < > < ___) |\ V / | __/
|_| \_\/_/\_\|____/ \_/ |_|
```
[](https://travis-ci.org/hi@liangdahong.com/RxSVP)
[](https://cocoapods.org/pods/RxSVP)
[](https://cocoapods.org/pods/RxSVP)
[](https://cocoapods.org/pods/RxSVP)
## 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](https://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
pod 'RxSVP'
```
```swift
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
hi@liangdahong.com
## License
RxSVP is available under the MIT license. See the LICENSE file for more info.