Latest 1.1.0
Homepage https://github.com/roshanman/RxUIAlertController
License MIT
Platforms ios 8.0
Dependencies RxSwift, RxCocoa
Authors

CocoaPods
Swift 3
License
Platform

RxUIAlertController is a wrapper library to work with RxSwift and UIAlertController.

Installation

RxUIAlertController is available through CocoaPods.

pod 'RxUIAlertController'

Sample code

Alert(title: "Test", message: "This is a test message.")
    .addAction(title: "Yes")
    .addAction(title: "No", style: .destructive)
    .addTextField{
        $0.placeholder = "placeholder"
    }
    .rx.show()
    .subscribe(onNext: {
        print("button: ($0.buttonTitle)")
        print($0.controller.textFields?.first?.text ?? "")
    })
    .addDisposableTo(disposeBag)

ActionSheet(title: "Test", message: "This is a test message.")
    .addAction(title: "Yes")
    .addAction(title: "No", style: .destructive)
    .addAction(title: "Cancel", style: .cancel)
    .setPresenting(source: sender)
    .rx.show()
    .subscribe(onNext: {
        print("button: ($0.buttonTitle)")
    })
    .addDisposableTo(disposeBag)

Example

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

License

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

Latest podspec

{
    "name": "RxUIAlertController",
    "version": "1.1.0",
    "summary": "ReactiveX way to use UIAlertController on iOS.",
    "description": "RxSwift binding for [Permission](https://github.com/delba/Permission) API that helps you with UIAlertController in iOS.",
    "homepage": "https://github.com/roshanman/RxUIAlertController",
    "license": "MIT",
    "authors": {
        "roshanman": "[email protected]"
    },
    "source": {
        "git": "https://github.com/roshanman/RxUIAlertController.git",
        "tag": "1.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Source/*.swift",
    "dependencies": {
        "RxSwift": [],
        "RxCocoa": []
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This