Cannot hide a UIButton
        Posted  
        
            by Neurofluxation
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Neurofluxation
        
        
        
        Published on 2010-03-19T12:08:59Z
        Indexed on 
            2010/03/19
            12:11 UTC
        
        
        Read the original article
        Hit count: 420
        
Hey again,
I have the following code:
visitSite.hidden = YES;
For some reason, when I click a UIButton and call this piece of code, the visitSite button does not hide.
The code is within this block:
-(IBAction)welcomeButtonPressed:(id)sender {
  [UIButton beginAnimations:@"welcomeAnimation" context:NULL];
  [UIButton setAnimationDuration:1.5];
  [UIButton setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
  ((UIView *)sender).hidden = YES;
  [UIButton commitAnimations];
  visitWebsite.hidden = YES; //THIS DOESN'T WORK!
}
Help!!
© Stack Overflow or respective owner