Reputation: 187
I have embedded some ViewControllers in a UINavigationController
But the backButton/navigationBar is not showing. In the second ViewController
the navigationBar is shoving in StoryBoard, but not appearing in simulator, and in the third ViewController
the navigationBar is not showing at all. Why is this happening?
EDIT
I use prepareForSegue
to send data to the next ViewController
. I don't know if that matters..
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
performSegue(withIdentifier: "ToListVCSegue", sender: self)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?)
{
if segue.identifier == "ToListVCSegue"
{
let destination = segue.destination as! ListLocationViewController
if let indexPath = tableView.indexPathForSelectedRow{
destination.listID = listID[indexPath.row]
}
Upvotes: 0
Views: 60
Reputation: 178
You have to check options on the Inspector view for your navigation controller and all view controllers pushed on it.
Upvotes: 1
Reputation: 151
You probably connect thirdViewController with the secondViewController with a Storyboard Segue. Select that segue and in the Attributes Inspector, change the Kind to 'Show (e.g. Push)'
Upvotes: 0