I am trying to create an app where I want a user to be a able to increase and decrease a number using a segmented controller. I have two problems.
You are using the wrong control for this. There is a UIStepper
which will do what you want.
https://developer.apple.com/documentation/uikit/uistepper?changes=latest_minor