0

I have an app in which there is a ViewController and once a button is pressed it goes to DetailViewController. In ViewController I have hidden the navigation bar to have more room to display an image while in DetailViewController it is necessary.

When I hit the back button in DetailViewController it goes back, however since it has a navigation bar and ViewController doesn't the animated segue looks bad. I was wondering, is there a way to make the default back button (that comes when embedded into navigation controller) give you a non animated segue?

Thanks

Sam Spencer
  • 8,492
  • 12
  • 76
  • 133

1 Answers1

0

try using [[self navigationController] setNavigationBarHidden:{YES,NO} animated:{YES,NO}]; in view{Will,Did}{Dis}appear instead of setting everything up via Xcode UI controls

You can get good results WITH animation using them too.


If you really want to remove the whole animation, though: Prevent the animation when clicking "Back" button in a navigation bar?

Community
  • 1
  • 1
blub
  • 1,014
  • 7
  • 18
  • i already have set the navigation bar to hidden or not in the viewWillAppear and that is precisely what is causing the glitchy looking segue. The top ViewController needs it hidden while the one that has the navigation bar doesn't have it hidden. That is why when the back button is pressed it looks glitchy – user1601259 Feb 19 '13 at 20:19