1
一旦按下btn1,我無法更改UIButton btn2的標題。當我使用_definition settitle:@"Show Word" forState: UIControlStateNormal
它改變了原來的btn1。如何在按下UIbutton時更改UIbutton標題?
這裏是您的評論的代碼,
- (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);
}
簡單地檢查你的筆尖文件用於連接第二個按鈕的插座及其屬性。它看起來像你的第二個按鈕的插座設置與第一個按鈕的屬性。 – Bhavin