From 5549587648f1f045a690e42f755dbed5a9c375b4 Mon Sep 17 00:00:00 2001 From: pawurb Date: Mon, 13 Feb 2017 15:47:56 +0100 Subject: [PATCH] add countDownDuration for UIDatePicker --- RxCocoa/iOS/UIDatePicker+Rx.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/RxCocoa/iOS/UIDatePicker+Rx.swift b/RxCocoa/iOS/UIDatePicker+Rx.swift index 4af58543..f7730e30 100644 --- a/RxCocoa/iOS/UIDatePicker+Rx.swift +++ b/RxCocoa/iOS/UIDatePicker+Rx.swift @@ -18,7 +18,7 @@ extension Reactive where Base: UIDatePicker { public var date: ControlProperty { return value } - + /// Reactive wrapper for `date` property. public var value: ControlProperty { return UIControl.rx.value( @@ -30,7 +30,18 @@ extension Reactive where Base: UIDatePicker { } ) } - + + /// Reactive wrapper for `countDownDuration` property. + public var countDownDuration: ControlProperty { + return UIControl.rx.value( + self.base, + getter: { datePicker in + datePicker.countDownDuration + }, setter: { datePicker, value in + datePicker.countDownDuration = value + } + ) + } } #endif