Fixes RxCocoa for macOS.

This commit is contained in:
Mo Ramezanpoor 2016-08-16 15:33:06 +01:00
parent 695ea19e02
commit b0026d65eb
3 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ extension NSControl {
You might be wondering why the ugly `as!` casts etc, well, for some reason if
Swift compiler knows C is UIControl type and optimizations are turned on, it will crash.
*/
static func rx_value<C: AnyObject, T: Equatable>(_ control: C, getter: (C) -> T, setter: (C, T) -> Void) -> ControlProperty<T> {
static func rx_value<C: AnyObject, T: Equatable>(_ control: C, getter: @escaping (C) -> T, setter: @escaping (C, T) -> Void) -> ControlProperty<T> {
MainScheduler.ensureExecutingOnScheduler()
let source = (control as! NSObject).rx_lazyInstanceObservable(&rx_value_key) { () -> Observable<T> in

View File

@ -18,7 +18,7 @@ extension NSImageView {
Bindable sink for `image` property.
*/
public var rx_image: AnyObserver<NSImage?> {
return self.rx_imageAnimated(nil)
return self.rx_image(transitionType: nil)
}
/**

View File

@ -22,7 +22,7 @@ public class RxTextFieldDelegateProxy
, NSTextFieldDelegate
, DelegateProxyType {
private let textSubject = PublishSubject<String>()
fileprivate let textSubject = PublishSubject<String>()
/**
Typed parent object.