Simple segue does not work in xcode 7

A simple indent that worked for several months with this command:

[self performSegueWithIdentifier:@"ExpirationWarningSegue" sender:self]; 

now gives this error:

*** Application termination due to the uncaught exception “NSInternalInconsistencyException”, reason: “Failed to execute segue with identifier“ ExpirationWarningSegue ”. Seg must either have execute Handler or it must override -perform. '

What? This is the turn. I drag a command from one UIViewController to another in the storyboard. I am not writing code for this. The cemetery is defined in the storyboard using this exact identifier.

Why is this happening now when I upgraded to xcode 7 when it worked fine?

+1
source share
2 answers

The error message tells you what the problem is:

'Failed to execute segue with identifier "ExpirationWarningSegue". Segue must either have a performHandler, or it must override -perform. ''

This is a custom segue. Therefore, it must implement perform .

The cool feature of Xcode 7 / iOS 9 is that you can use a custom segment even if you have already specified a push (show) series or current (modal) session. In this case, your perform should call super to get the original behavior.

+6
source

See my comment here . This is a simple custom implementation of segue in objC. Transferring it to fast is trivial.

0
source

All Articles