我有一个UIButton
,当按下时,会显示一个新的视图,用户可以在其中更改一些设置.当视图被驳回时,我想更新UIButton
的标题/文本以反映新的状态.我打电话:
[myButton setTitle: @"myTitle" forState: UIControlStateNormal];
[myButton setTitle: @"myTitle" forState: UIControlStateApplication];
[myButton setTitle: @"myTitle" forState: UIControlStateHighlighted];
[myButton setTitle: @"myTitle" forState: UIControlStateReserved];
[myButton setTitle: @"myTitle" forState: UIControlStateSelected];
[myButton setTitle: @"myTitle" forState: UIControlStateDisabled];
但它似乎永远不会改变IB中规定的原文/标题.