I have added several components to the NavigationBar in the application that I am creating. The height of the panel changes dynamically, as in Safari for iPhone, when you click on the URL field. I have all the interactions and changes that work perfectly, except when I switch to another tab and come back.
If I started the application, click on the second tab, which displays the navigation bar.

If I immediately click on the first tab, and then again on the second tab, then the NavigationBar is cropped.

I configure navbar in my viewWillAppear method
- (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if (navBar == nil) { CGFloat width = self.view.frame.size.width; navBar = [self.navigationController.navigationBar autorelease]; navBar.frame = CGRectMake(0,20,width,52);
Check out the final comment in the code above. If I make the keyboard display or the user clicks on a UITextField, the NavBar displays correctly.
I tried a lot of things - checking the frame sizes in the view (view 2 in the images), NavBar, but no luck. Does anyone know what the problem is? I will be happy to tell you more.
Thanks.
source share