How can I hide a UIButton
on the tap of another button, or any other event?
Create an outlet for the button to hide and connect it in your xib:
IBOutlet UIButton *myButton;
Now create an IBAction
for the other button and connect it in the xib:
-(IBAction)hideButton
{
myButton.hidden = YES;
}
So now when you click on the second button, it will hide myButton
.
In your IBAction
for the button tap:
[*yourbutton* setHidden:YES];
[self.btnReport setHidden:YES];
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