views:

56

answers:

4

I am trying to have some controls appear when you push a button and have it disappear when you press a different button. Right now the HUD is comprised of an image view, and some custom buttons in a UIView called "credits". I've managed to have it disappear using:

[credits removeFromSuperview];

How do I have it reappear?

+2  A: 

If it's just a UIImageView, you should...

[self.view addSubview:credits];

... assuming you've not released it already. On a side note, there is a really good HUD for iOS here: http://github.com/matej/MBProgressHUD

Jamie Chapman
A: 

You'd better set their hidden property to whether YES or NO

NR4TR
A: 

I believe you can just set the view to be hidden

[self.view setHidden:YES];

While it's hidden, you can also update the view and then show again

[self.view setHidden:NO];
DysonApps
A: 

This method will toggle the UIView credits hidden property

- (void) toggleCredits {

[credits setHidden:![credits isHidden]];

}
TomH