I have an application I'm working on where I need a button (upon click) to show/hide a label. I set up the label as an IBOutlet, and the button as an IBAction - but don't really know where to go from here. I'm still very new to cocoa - I figure it's pretty simple but objective-c is daunting to me. Any help (in dummies terms)?
Something like this should do.
if ([theLabel isHidden]) {
[theLabel setHidden:NO];
} else {
[theLabel setHidden:YES];
}
You can see the docs for both methods here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With