mirror of
https://github.com/ReactiveX/RxSwift.git
synced 2024-10-05 06:27:29 +03:00
add countDownDuration for UIDatePicker
This commit is contained in:
parent
4e19a21bda
commit
5549587648
@ -18,7 +18,7 @@ extension Reactive where Base: UIDatePicker {
|
||||
public var date: ControlProperty<Date> {
|
||||
return value
|
||||
}
|
||||
|
||||
|
||||
/// Reactive wrapper for `date` property.
|
||||
public var value: ControlProperty<Date> {
|
||||
return UIControl.rx.value(
|
||||
@ -30,7 +30,18 @@ extension Reactive where Base: UIDatePicker {
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
/// Reactive wrapper for `countDownDuration` property.
|
||||
public var countDownDuration: ControlProperty<TimeInterval> {
|
||||
return UIControl.rx.value(
|
||||
self.base,
|
||||
getter: { datePicker in
|
||||
datePicker.countDownDuration
|
||||
}, setter: { datePicker, value in
|
||||
datePicker.countDownDuration = value
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user