UIProgressView+Rx.swift 471 B

12345678910111213141516171819202122232425
  1. //
  2. // UIProgressView+Rx.swift
  3. // RxCocoa
  4. //
  5. // Created by Samuel Bae on 2/27/16.
  6. // Copyright © 2016 Krunoslav Zaher. All rights reserved.
  7. //
  8. #if os(iOS) || os(tvOS)
  9. import RxSwift
  10. import UIKit
  11. extension Reactive where Base: UIProgressView {
  12. /// Bindable sink for `progress` property
  13. public var progress: Binder<Float> {
  14. return Binder(self.base) { progressView, progress in
  15. progressView.progress = progress
  16. }
  17. }
  18. }
  19. #endif