Skip to content

Commit

Permalink
Added reactive wrapper for UIStepper stepValue property
Browse files Browse the repository at this point in the history
  • Loading branch information
svdo authored and kzaher committed Nov 1, 2017
1 parent a1e6be8 commit 1743fa6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions RxCocoa/iOS/UIStepper+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ extension Reactive where Base: UIStepper {
}
)
}

/// Reactive wrapper for `stepValue` property.
public var stepValue: ControlProperty<Double> {
return UIControl.rx.value(
self.base,
getter: { stepper in
stepper.stepValue
}, setter: { stepper, stepValue in
stepper.stepValue = stepValue
}
)
}

}

Expand Down

0 comments on commit 1743fa6

Please sign in to comment.