From 978b4eb6291a8cf3aaade0e71a88d7e3e7c5e3da Mon Sep 17 00:00:00 2001 From: Yoshinori Sano Date: Fri, 9 Oct 2015 09:15:59 +0900 Subject: [PATCH] Fix outdated comments on UISearchBar's rx_searchText property. --- README.md | 4 ++-- RxCocoa/Common/DelegateProxyType.swift | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5acb77e4..30b1ef8b 100644 --- a/README.md +++ b/README.md @@ -321,7 +321,7 @@ extension UISearchBar { return proxyForObject(self) as RxSearchBarDelegateProxy } - public var rx_searchText: Observable { + public var rx_text: Observable { return defer { [weak self] in let text = self?.text ?? "" @@ -341,7 +341,7 @@ This is how that API can be now used ```swift -searchBar.rx_searchText +searchBar.rx_text .subscribeNext { searchText in print("Current search text '\(searchText)'") } diff --git a/RxCocoa/Common/DelegateProxyType.swift b/RxCocoa/Common/DelegateProxyType.swift index 562f0078..5b7b77fa 100644 --- a/RxCocoa/Common/DelegateProxyType.swift +++ b/RxCocoa/Common/DelegateProxyType.swift @@ -160,7 +160,7 @@ Returns existing proxy for object or installs new instance of delegate proxy. return proxyForObject(self) as RxSearchBarDelegateProxy } - public var rx_searchText: ControlProperty { + public var rx_text: ControlProperty { let source: Observable = self.rx_delegate.observe("searchBar:textDidChange:") ... }