0

I have a UIToolbar that is shown on the current top UIWindow. Before I am showing a certain UIViewController (in push) I am hiding the UIToolbar by removing it from the window. When I get back I'm trying to reshow the UIToolbar by adding it back to the top UIWindow (with addSubview). What happens is that the buttons that were in the toolbar disappears and it appears to be empty but after showing a UIActionSheen and closing it, al the buttons appears again.

What is the problem?

Thanks, Yoav.

Lupos
  • 31
  • 4
  • Instead of removing and adding the toolbar, what happens if you just hide and show it? Set its alpha to 0 to hide it and set its alpha to 1 to show it. Does that help? – rmaddy Oct 14 '12 at 17:29

1 Answers1

0

I think you are coding in viewWillAppear or viewDidAppear try to code that in viewDidLoad

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
}
junaidsidhu
  • 3,539
  • 1
  • 27
  • 49