Add UIScrollView.rx_scrollEnabled

This commit is contained in:
Suyeol Jeon 2016-06-08 04:12:53 +09:00
parent e26bce70af
commit e291bff0f0
1 changed files with 10 additions and 1 deletions

View File

@ -46,7 +46,16 @@ extension UIScrollView {
return ControlProperty(values: proxy.contentOffsetSubject, valueSink: bindingObserver)
}
/**
Bindable sink for `scrollEnabled` property.
*/
public var rx_scrollEnabled: AnyObserver<Bool> {
return UIBindingObserver(UIElement: self) { scrollView, scrollEnabled in
scrollView.scrollEnabled = scrollEnabled
}.asObserver()
}
/**
Installs delegate as forwarding delegate on `rx_delegate`.