Simply removing the alpha will not force your button to be completely removed from your view. To the user, it will be like disappearing, but still there. They potentially could still accidentally click on it, not knowing. So what you can do is make a timer to remove it from the view after it has disappeared.
... //alpha animation //remove from view timer1 = [NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(hideMyButton) userInfo:nil repeats:NO]; } -(IBAction) hideMyButton { [_myButon removeFromSuperview]; }
source share