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