Reputation: 61
In my storyboard I have a view with a segue into a new view that's embedded into a Navigation Controller (so the segue points to the navigation controller). I have the segue set to a Modal transition, however when the new view is animating up, it contains the standard blue navigation bar above the view (which then animates out of view).
Here's what it looks like mid segue: https://i.sstatic.net/0Iyh3.png
How do I make it so the modal view animates up but without the navigation bar?
I have tried hiding the navigation bar in the embedded view's init, viewWillAppear
, and vieWillLoad
methods and that doesn't work.
I event went so far as to create a custom subclass of UINavigationController
and set the navigation controller in the storyboard to it.
Thanks!
Upvotes: 2
Views: 3613
Reputation: 1414
This may sound pretty simple, but have you tried hiding the navigation bar immediately before the modal segue starts? I had this problem when presenting a modal view controller and adding a [self.navigationController setNavigationBarHidden:YES] immediately before the presentation did the trick for me.
Upvotes: 1
Reputation: 1743
I had almost the same problem, but I wanted to get a navigation bar for my modal transition, as it was always hidden. There may be two ways for you to remove the navigation bar:
Regards
Upvotes: 0