I'm developing a swift app that has a Tab Bar Controller and one of the tabs has a Navigation Controller. The tab with a Navigation Controller has a Table View, and the cells in the Table View segue to a regular View Controller. The information appears in the destination view controller as desired, put when the destination view controller is presented, both the tab bar and the navigation bar disappear.
Here is my 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 to cast cell as EntryTableViewCell")
}
} else {
print("prepareForSeque: Index cannot be established")
}
} else {
print("prepareForSeque: Destination cannot be downcast to EntryDetailViewController")
}
}
}
Here is a link to a photo of my storyboard: http://grantbroadwater.com/storyboard.png