Skip to content

Commit 1743fa6

Browse files
svdokzaher
authored andcommitted
Added reactive wrapper for UIStepper stepValue property
1 parent a1e6be8 commit 1743fa6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

RxCocoa/iOS/UIStepper+Rx.swift

+12
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ extension Reactive where Base: UIStepper {
2525
}
2626
)
2727
}
28+
29+
/// 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+
)
39+
}
2840

2941
}
3042

0 commit comments

Comments
 (0)