Avatar ·

How to remove unwanted UIButton animation when changing title in iOS

Hi everyone! I'm a beginner in iOS development and I've encountered a strange problem. When I programmatically change a button's title (for example, on tap or by timer), there's a smooth animation of the text changing — it kind of "flows" from the old text to the new one. This looks ugly, especially if you need to update the button quickly, for example, in a game interface or when changing status. Here's an example of my Swift code: ```swift class ViewController: UIViewController { @IBOutlet weak var myButton: UIButton! override func viewDidLoad() { super.viewDidLoad() myButton.setTitle("Press me", for: .normal) } @IBAction func buttonTapped(_ sender: UIButton) { myButton.setTitle("New text", for: .normal) } } ``` When the button is tapped, the title changes