Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

Commit

Permalink
[Swift3.0] Change rx_permission to rx.permission
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinejr committed Sep 29, 2016
1 parent 57684ea commit 730df78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Example/RxPermission/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class ViewController: UIViewController {

Permission
.locationAlways
.rx_permission
.subscribe(onNext: { status in
.rx.permission
.subscribe(onNext: { status in
self.label.text = "Status: \(status)"
})
.addDisposableTo(disposeBag)
Expand Down
8 changes: 4 additions & 4 deletions Source/RxPermission.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
import Permission
import RxSwift

public extension Permission {

extension Reactive where Base: Permission {
/// Reactive wrapper for `Permission` instance.
public var rx_permission: Observable<PermissionStatus> {
public var permission: Observable<PermissionStatus> {
return Observable.create { (observer) in
self.request { observer.onNext($0) }
self.base.request { observer.onNext($0) }
return AnonymousDisposable { observer.onCompleted() }
}
}
Expand Down

0 comments on commit 730df78

Please sign in to comment.