Reputation: 84
I have defined a button in my Storyboard. I have then defined it in my .h file as an IBAction
, and connected it to the button from the storyboard.
I want it to be hidden by default, and also when I tap it once, it should hide itself. I'm not having any luck trying to hide it.
This is what my code looks like right now. There's an error thrown:
Property
hidden
not found on object of type CounterViewController
- (IBAction)retry:(id)sender
{
self.hidden=TRUE;
}
Upvotes: 0
Views: 195
Reputation: 164
You can also use following
- (IBAction)retry:(UIButton *)sender
{
sender.hidden=YES;
}
Upvotes: 1
Reputation: 20410
Try this:
- (IBAction)retry:(id)sender {
((UIButton *)sender).hidden=YES;
}
Upvotes: 5