swift - Navigation and Tab bar disappear with Push Segue -
i'm developing swift app has tab bar controller , 1 of tabs has navigation controller. tab navigation controller has table view, , cells in table view segue regular view controller. information appears in destination view controller desired, put when destination view controller presented, both tab bar , navigation bar disappear.
here prepareforsegue:
override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) { if segue.identifier == "entrycelltoentryview" { if let destination = segue.destinationviewcontroller as? entrydetailviewcontroller { if let index = customtableview.indexpathforselectedrow { if let cell = customtableview.cellforrowatindexpath(index) as? entrytableviewcell { destination.entrytodisplay = cell.entry } else { print("prepareforseque: unable cast cell entrytableviewcell") } } else { print("prepareforseque: index cannot established") } } else { print("prepareforseque: destination cannot downcast entrydetailviewcontroller") } } } here link photo of storyboard: http://grantbroadwater.com/storyboard.png
the navigation bar , tab bar disappears, because using model segue.
change segue push show.
in model segue destination viewcontroller appears on top of current viewcontroller. destination view controller not have idea navigation stack or tab bar.
if use push segue, or show segue days, pushed navigation stack.
Comments
Post a Comment