samedi 27 juin 2015

Hit button once to show UIImage. Hit button again to hide UIImage

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 would like it so when i repress the instruction button, the speech bubble 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?

Thank you (:

Aucun commentaire:

Enregistrer un commentaire