1
votes

I've added a segue from a view controller through a navigation controller to another view controller. I'm trying to call performSegueWithIdentifier but I'm running into this error:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver () has no segue with identifier 'toLogin'

The code that I'm using is:

self.performSegue(withIdentifier: "toLogin", sender: self)

Here's my setup (with the segue selected): enter image description here

1

1 Answers

0
votes

There is no navigation controller in your storyboard for initial view instead of having navigation controller for login controller embed your initial view controller with navigation controller.