Reputation: 25
I've placed some images in my interface with Interface Builder and set them to be hidden on startup... Now I want to change the hidden attribute to FALSE, when I press a button, but I haven't tried accessing interface built images in my code before (not even sure if it is possible)...
Any help?
Upvotes: 2
Views: 775
Reputation: 758
Just create some IBOutlets in your code, connect them in Interface Builder and then use them in your code.
e.g.
//in your header:
IBOutlet UIImageView *image;
// in your code (e.g. in the IBAction for the button):
- (IBAction)showImageNowFoo:(id)sender {
[image setHidden:NO];
}
btw: FALSE is false. NO is Objective-C (although FALSE works..)
Upvotes: 2