self?.performSegue(withIdentifier: "myview", sender: nil)
Above code do not show the navigation bar even though I use push in storyboard. Below code is shows me an error, even though the segue with correct name exist
self?.navigationController?.performSegue(withIdentifier: "myview", sender: nil)
Error
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'myview''
Your navigation bar might be hidden, try adding this code in viewcontroller which get called by the segue
override func viewWillAppear(_ animated: Bool) {
self.navigationController?.setNavigationBarHidden(false, animated: true)
}
Note: Please check the viewController pushing the segue with "myView" is embeded in UINavigationController .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With