I am having trouble changing the title of UIButton btn2 once btn1 is pressed. When I use _definition settitle:@"Show Word" forState: UIControlStateNormal
it changes the original btn1.
Here is the code for your review,
- (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);
}
u can try this way:
Try something along the lines of: