按下 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);
}
尝试一些类似的事情:
[btn2 setTitle:@"Show Word"]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)