0

I have a program with two stepper controls. I click the first control and increase to 10. When I click the second control, the value of the first control changes to 11, before the second control changes. If I would set the second stepper to 5 and press the first stepper down, the second value changes to 4, before the first stepper changes.

So the two steppers interferes with each other in the change from one to the other but only then.

Here is what I believe is the significant code:

@IBAction func firstMarkdownPressed(_ sender1: UIStepper) {
       let firstMarkdownNum = Double(sender1.value)
        firstMarkdownText.text = "\(String(format:"%.0f%",firstMarkdownNum))%"

    }

    @IBAction func secondMarkdownPressed(_ sender2: UIStepper) {
        let secondMarkdownNum = Double(sender2.value)
        secondMarkdownText.text = "\(String(format:"%.0f%",secondMarkdownNum))%"

    }
    override func viewDidLoad() {
        super.viewDidLoad()
        firstMarkdownStepper.wraps = false
        firstMarkdownStepper.autorepeat = true
        firstMarkdownStepper.maximumValue = 100
        firstMarkdownStepper.value = 0
        firstMarkdownStepper.isContinuous = false
        secondMarkdownStepper.wraps = false
        secondMarkdownStepper.autorepeat = true
        secondMarkdownStepper.maximumValue = 100
        secondMarkdownStepper.value = 0
    }

Any thoughts?

Terry Ohr
  • 1
  • 1

1 Answers1

0

Sorry I didn't check the app on an actual device. The problem I described only happens using the simulator. When running on an actual iPhone, it works as it should.

Terry Ohr
  • 1
  • 1