Search code examples
iosmathuitextfielduistepper

How to multiply UIStepper value to Textfield value ios?


How to multiply UIStepper value (product quantity) to textfield value (product price) and get total sum in uilabel.text?

enter image description here


Solution

  • UIStepper has a .value property that you can use:

    double sumTotal = stepper.value * [[textField text] doubleValue];