I'm new here. In my game an IBAction triggers setting a button's image. The device reacts with setting an image to another button. Depending on the situation the device sets a new image at its button. This all works so fast that the user only sees the last image. How can I interrupt the program sequence? I tested sleep(), timer, DispatchTime.now - but nothing works. I've made a little code, that describes my problem:
`@IBAction func StartPressed(_ sender: Any) {
Button1.setTitle("1", for: .normal)
Thread.sleep(until: Date(timeIntervalSinceNow: 2.5))
Button2.setTitle("2", for: .normal)
}
` In this example the title text of both buttons is shown after 2.5 seconds from pressing the Start button. But the first button should show his title immediately and after 2.5 seconds the second button should show its title. I'm very grateful for every idea.