Changing UIButton text

后端 未结 7 1381
遇见更好的自我
遇见更好的自我 2020-12-25 10:23

So I\'m trying to update the text on a UIButton when I click it. I\'m using the following line to change the text:

calibrationButton.titleLabel.text = @\"Cal         


        
7条回答
  •  生来不讨喜
    2020-12-25 11:14

    programmatically you can set button title like below:

    [myButton setTitle:@"buttonTitle" forState:UIControlStateNormal];
    

    you can also set button title property from storyboard.

提交回复
热议问题