How to add a UIStepper to a TextField inside an Alert?

Viewed 62

Here is a screenshot of my alert:

enter image description here

Is there a way to add a stepper to the right of my second alert textfield's text so I can modify it through a stepper, instead of having to write down the number?

I tried adding a UIStepper as the subview to the alertTextField like this:

alert.addTextField { (alertTextField) in
        alertTextField.placeholder = "Agregar cajas"
        alertTextField.addSubview(stepper)
        boxes = alertTextField
    }

But this is what I end up with:

enter image description here

Any help would be highly appreciated.

0 Answers
Related