0

I want to navigate from left controller to right controller by clicking the "here" button

Here is the code for Sign In button navigation and also the "here" button to navigate to the right controller

The "here" button navigate to the next controller is having the segue name "gotoSignUp", but in the program, I've clicked the "here" button and the error existed. Is my code having some problem to make the navigation? The Segue name "gotoLogin" no problem at all, but "gotoSignUp" have error after I clicked the "here" button. The error is shown like this

This is the error as I can't print screen whole error output

jefferyleo
  • 630
  • 3
  • 17
  • 34

3 Answers3

0

You shouldn't manually perform the segue, it's already happening on it's own.

The delegate asks you if the segue with that identifier should happen, so if it's "gotoSignUp", just return true to make it continue

Fabio Ritrovato
  • 2,546
  • 1
  • 13
  • 19
  • This is doesn't work since I've tried it just now, I also thought that return true is the way to solve it out, but it didn't. – jefferyleo Apr 07 '15 at 17:35
  • I feel there was no need to down vote our answers, since they might not be the actual solution (they could have since the limited info at the time), but also, they are not wrong, you still should not perform the segue manually – Fabio Ritrovato Apr 07 '15 at 22:38
  • I'm not the one who down vote you, I've already vote you up to make this comment to 0 :) – jefferyleo Apr 08 '15 at 02:57
0

I've solved my issue, it is an xcode 6 bug with ios 8. Apple still haven't fixed this problem until now, I just disabled the auto layout in the right hand side controller then it can be navigated now.

jefferyleo
  • 630
  • 3
  • 17
  • 34
-1

Inside shouldPerformSegue you only need to return true or false. You should never call performSegueWithIdentifier inside this method

if idintifier == "gotoSignUp"
{
    return true
}
Aviel Gross
  • 9,770
  • 3
  • 52
  • 62