【发布时间】:2012-02-16 12:22:10
【问题描述】:
按下 btn1 后,我无法更改 UIButton btn2 的标题。当我使用_definition settitle:@"Show Word" forState: UIControlStateNormal 时,它会更改原来的 btn1。
这是供您查看的代码,
- (IBAction)mynextPressed:(UIButton *)sender {
//Display the string in the label field
[self.WordDisplay setText:vocabulary];
//reset center button with "show word"
[_definitionPressed setTitle:@"Show Word" forState:UIControlStateNormal];
NSLog(@"displaying word: %@", _definitionPressed.titleLabel);
}
【问题讨论】:
-
只需检查您的笔尖文件,了解第二个按钮插座的接线及其属性。看起来您的第二个按钮的插座是使用第一个按钮的属性设置的。