我有一个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 中指定的原始文本/标题。