Search code examples
uitabbarcontrolleruinavigationbarsegueuitabbaruistoryboardsegue

Navigation bar and Tab bar disappears when doing push segue


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?


Solution

  • 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.