Skip to content

Commit 9ae6be4

Browse files
svdokzaher
authored andcommitted
Changed stepValue to UIBindingObserver because it's not target/action based
1 parent 101d4bc commit 9ae6be4

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

RxCocoa/iOS/UIStepper+Rx.swift

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,10 @@ extension Reactive where Base: UIStepper {
2727
}
2828

2929
/// Reactive wrapper for `stepValue` property.
30-
public var stepValue: ControlProperty<Double> {
31-
return UIControl.rx.value(
32-
self.base,
33-
getter: { stepper in
34-
stepper.stepValue
35-
}, setter: { stepper, stepValue in
36-
stepper.stepValue = stepValue
37-
}
38-
)
30+
public var stepValue: UIBindingObserver<Base, Double> {
31+
return UIBindingObserver(UIElement: self.base) { stepper, value in
32+
stepper.stepValue = value
33+
}
3934
}
4035

4136
}

0 commit comments

Comments
 (0)