0
votes

I'm using navigation controller in my application and on certain views I want to hide them.

I use the following code to hide and show the navigation controller.

- (void)viewWillAppear:(BOOL)animated
{
    [navigationController setNavigationBarHidden: YES animated:YES]
}

- (void)viewWillDisappear:(BOOL)animated
{
    [navigationController setNavigationBarHidden: NO animated:YES]
}

I'm calling these methods when I push the view controller.

[self.viewController.navController pushViewController:mapViewController animated:YES];

This is working fine however it results in a jerky effect.

In the first view, the navigation bar gets hidden which results in the whole screen moving up and then it shows the second view.

While popping the second view, the navigation bar gets shown and it pushes the whole screen down and then shows the first view.

Is there anyway I can make this work without the jerky effect ?

Cheers

1

1 Answers

0
votes

Use a translucent nav bar, this will sit over the view and not push it down