From 3f2ecaf84b0c373e322dccdb6519e0a72dcd4ee1 Mon Sep 17 00:00:00 2001 From: Nagasawa Hiroki Date: Fri, 11 Mar 2016 10:16:49 +0900 Subject: [PATCH] Change label to view in RxExample --- .../GeolocationViewController.swift | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/RxExample/RxExample/Examples/GeolocationExample/GeolocationViewController.swift b/RxExample/RxExample/Examples/GeolocationExample/GeolocationViewController.swift index e94c6c1b..06d0189e 100644 --- a/RxExample/RxExample/Examples/GeolocationExample/GeolocationViewController.swift +++ b/RxExample/RxExample/Examples/GeolocationExample/GeolocationViewController.swift @@ -23,14 +23,14 @@ private extension UILabel { private extension UIView { var rx_driveAuthorization: AnyObserver { - return UIBindingObserver(UIElement: self) { label, authorized in + return UIBindingObserver(UIElement: self) { view, authorized in if authorized { - label.hidden = true - label.superview?.sendSubviewToBack(label) + view.hidden = true + view.superview?.sendSubviewToBack(view) } else { - label.hidden = false - label.superview?.bringSubviewToFront(label) + view.hidden = false + view.superview?.bringSubviewToFront(view) } }.asObserver() } @@ -48,7 +48,6 @@ class GeolocationViewController: ViewController { let geolocationService = GeolocationService.instance - geolocationService.autorized .drive(noGeolocationView.rx_driveAuthorization) .addDisposableTo(disposeBag)