'Receiver (<ViewController>) has no segue with identifier 'addSegue'
I had this same problem and actually my problem was that I was calling
WRONG: [self.navigationController performSegueWithIdentifier:@"ShowVerify" sender:self];
instead of
CORRECT: [self performSegueWithIdentifier:@"ShowVerify" sender:self];
so check that you are calling correct performSegueWithIdentifier method :)
use segue identifier in Push Method and give the proper connection
if you are using Identifier
, then call this line where u need
[self performSegueWithIdentifier:@"identifierName" sender:self];
Swift 2.X
self.performSegueWithIdentifier("identifierName", sender: self)
Swift 3
self.performSegue(withIdentifier: "identifierName", sender: self)
Regarding the new screen you have added that way. In that screen, when you're finished and want to remove it, it's just:
self.dismiss(animated: false, completion: nil)
Hard to say for sure, but some other people have had similar problems:
In this question, the asker instantiated the storyboard with
init
instead ofinstantiateViewControllerWithIdentifier
so the segue wasn't set up properly.In this question, it was just something weird going on internally with xcode and the simulator, and running Product->Clean helped.
And of course, it's possible the segue name in the code doesn't match the segue name on the Storybord, but I'm guessing you've checked that a lot of times already!