尝试将文本设置为按钮时,警告UIButton可能不响应-'settitle'。

对于下面的代码行。

[firstButton setTitle:[buttonArray objectAtIndex:0]];

[secondbutton setTitle:[buttonArray objectAtIndex:i+index]];

最佳答案

尝试:

[firstButton setTitle:[buttonArray objectAtIndex:0] forState:UIControlStateNormal];

[secondbutton setTitle:[buttonArray objectAtIndex:i+index] forState:UIControlStateNormal];

关于ios - 设置按钮标题时发出警告uibutton可能不响应-settitle,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10259015/

10-12 05:35