Search code examples
iphoneipaduiviewuinavigationcontrolleruinavigationbar

view jumps when navigation bar hidden


In our app when one of the view is pushed to the navigation controller, the navigation bar is visible for 5 seconds and then we set navigationBarHidden to TRUE. Later if the user taps on the screen we toggle navigationBarHidden values. But as the navigation bar id hidden or is made visible, the view jumps up and down respectively for these actions.

Is there any way I can prevent the view from jumping when the bar is hidden or made visible?

Thanks and Regards, Hetal


Solution

  • Are you using setNavigationBarHidden: or setNavigationBarHidden:animated:?

    Try [navigationController setNavigationBarHidden:NO animated:YES];.

    If the issue is the view changing size then you will have to account for that in the view itself, ie it will have to be able to handle both sizes.