I have to hide some buttons when I tap a button, and unhide them when I touch the button again.
This is what I have:
- (IBAction)hideButtons {
backbutton.hidden = YES;
nextbutton.hidden = YES;
resetbutton.hidden = YES;
}
and
- (IBAction)showButtons {
backbutton.hidden = NO;
nextbutton.hidden = NO;
resetbutton.hidden = NO;
}
How can I do this with one button? At first the buttons should be unhidden.
Just use this: (Works if all buttons are in the same state first):
backbutton.hidden=!backbutton.hidden;
nextbutton.hidden=!nextbutton.hidden;
resetbutton.hidden=!resetbutton.hidden;
Hope this helps