2

I am programatically trying to customize a UIStepper. I'd like to place the stepper.value between the - and + buttons and I want to change the background of the stepper to white.

How would I do that?

Here is what I have that does not work:

let stepper = UIStepper(frame: CGRect(x: 0, y: 0, width: 200, height: 40))
        stepper.minimumValue = 0
        stepper.center = self.contentView.center
        stepper.backgroundColor = .white
        stepper.layer.backgroundColor = UIColor.white.cgColor
        stepper.stepValue = 1
        stepper.tintColor = UIColor(hex: Constants.Colors.primary)
        stepper.setIncrementImage(UIImage(named: "icon_cart_plus"), for: .normal)
        stepper.setDecrementImage(UIImage(named: "icon_cart_minus"), for: .normal)
BVB09
  • 805
  • 9
  • 19
  • Maybe you can find some suggestions heer: https://www.cocoacontrols.com/search?q=uistepper – koen May 11 '20 at 15:14

0 Answers0