1
votes

I have the following structure in InterfaceBuilder in XCode:

  • Tab bar controller
    • Navigation bar controller
      • View Controller A
      • .. push segue to..
      • View Controller B

However I cannot get the push segue to keep the nav bar and tab bar. It also animates from the bottom like a modal segue.

This is how I start the segue:

self.performSegueWithIdentifier(DETAIL_MEETING_SEGUE_ID, sender: self)

Both VC1 and VC2 have unchecked "Hide Bottom Bar on Push".

In Interface Builder tab bar and nav bar are showing correctly. Also, when dragging a segue directly from a button to VC 2 with push set it works perfectly.

Any ideas?

2
I have the exact same problem at the moment. Did you find a solution? - Dan
I wrote how I solved it below. Not the best solution though. - Sunkas

2 Answers

1
votes

I experienced a similar issue after embedding tab bar stacks of VCs into navigation controllers. There was a storyboard push segue from VC a to VC b (in a different stack) that was called using performSegue:.

My fix: Delete the segue in storyboard, then create it again the exact same way. After this the VC b showed the tab bar and the navigation bar as expected.

Filed a bug with Apple Bug Reporter.

0
votes

I "solved" it by dragging a manual segue from the tableview cell to "View Controller 2". I then gave it the same name as before and made setup in prepareForSegue: as normal. I had to drag multiple segues but it was ok to use the same id for them.

If anyone have a better solution please write it here.