views:

26

answers:

1

How do I get a button with the a specifyed tag

id like to then cast it to a UIButton, and change the alpha

A: 
 UIView* view = [theViewContainingThatButton viewWithTag:tag];
 view.alpha = 0.5;

You don't need to cast the view to a UIButton to change its alpha. But you can add a (UIButton*) cast if really needed.

KennyTM
theViewContainingThatButton?Would this be AppNameViewController?
Sam Jarman
@Sam: Any superview of that button can be used. You could use `viewController.view` or even `window`.
KennyTM
yes.. self.view seems to be working aswell :DThanks!
Sam Jarman