Created
March 18, 2019 07:34
-
-
Save hechen/f38313d4ff349371b6e70075747fb12d to your computer and use it in GitHub Desktop.
Bindable sink for `loading` and property.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if os(macOS) | |
import Cocoa | |
import RxSwift | |
import RxCocoa | |
extension Reactive where Base: NSProgressIndicator { | |
/// Bindable sink for `loading` and property. | |
public var loading: Binder<Bool> { | |
return Binder(self.base) { indicator, value in | |
indicator.loading = value | |
} | |
} | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment