Forgive the mess; I may have extra code from trying to do this by using examples I found on here, but none seem to work.
I have a stepper
@IBOutlet weak var turnsRemaining: UILabel!
@IBOutlet weak var turnStepper: UIStepper!\
I have these functions:
@IBAction func turnStepperChanged(_ sender: UIStepper) {
turnsRemaining.text = Int(sender.value).description
}
What I want is to click a button called "leftRight" then triggers a function (which I have working) but I want to add to that function that the value of the stepper is decreased by one.
I tried adding the following line in the code as part of the function (a different function than the one listed above):
turnStepper.value = turnsRemaining.text -1