How do I get a button with the a specifyed tag
id like to then cast it to a UIButton, and change the alpha
UIButton *button=(UIButton *)[self.view viewWithTag:tag]; button.alpha=0.5;
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.
(UIButton*)