Metin Atalay Metin Atalay - 2 months ago 15
Swift Question

Swift Some method Button text not change

I have one button in uiview

and i change button name and i get button name , it Getting old reputation . however When I call it from somewhere when the method is finished its true


enter image description here


Wrapping your if statements in a performWithoutAnimation block will prevent any delays in updates to the titleLabel.

UIView.performWithoutAnimation {
    if btnOne.titleLabel?.text == "qq" {
        btnOne.setTitle("metin", forState: .Normal)
        var a = btnOne.titleLabel?.text // "metin"
        mergeString += sender.titleLabel!.text!