How to change UIbutton title once a UIbutton is pressed?

后端 未结 2 921
囚心锁ツ
囚心锁ツ 2021-01-25 10:56

I am having trouble changing the title of UIButton btn2 once btn1 is pressed. When I use _definition settitle:@\"Show Word\" forState: UIControlStateNormal it chan

2条回答
  •  隐瞒了意图╮
    2021-01-25 11:33

    u can try this way:

    [_definitionPressed setTitle:@"Normal State" forState:UIControlStateNormal];
    [_definitionPressed setTitle:@"Selected State" forState:UIControlStateHighlighted];
    

提交回复
热议问题