I researched on this website but couldn't find anything to help me. I'm a beginner in coding so this may seem simple to some of you but hard for me. I have an instruction button in my game that i press to show a speech bubble giving the user instruction. I am trying to achieve, when I repress the instruction button, the speech bubble should disappear.
.h
IBOutlet UIImageView *instructionsPic;
- (IBAction)instructionAction;
.m
- (IBAction)instructionAction {
instructionsPic.hidden = NO;
startGameButton.hidden = YES;
}
In my viewDidLoad i marked my instruction bubble speech as hidden and when the user hits the instruction button it shows up. So yea, how can i make it disappear again when they click the button again?
instructionsPic.hidden
to see if it is hidden, if so set it toYES
. Or simply:instructionsPic.hidden = ! instructionsPic.hidden
;