I have a UIStepper that currently affects one label (quantity) when tapped. I would like for that same UIStepper to affect another label which is the cost. Basically, I would like for the UIStepper to update the cost as the quantity is increased. Any help would be great.
You can update the value of both the labels with calculations when the UIStepper value function is called
You can make the code like this in the action of the UIStepper
@IBAction func stepperChanged(sender: UIStepper) {
lblQuantity.text = "\(sender.value)"
if sender.value == 1 {
lblCost.text = "12.5"
} else {
lblCost.text = "\(((sender.value-1) * 6.5) + 12.5)"
}
}