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.
Asked
Active
Viewed 215 times
0

jefferyleo
- 630
- 3
- 17
- 34
-
What is the error message you're receiving? – Ben Kane Apr 07 '15 at 17:18
-
Which error existed? – Johannes Knust Apr 07 '15 at 17:20
-
Something has already invoked the segue when shouldPerformSegue is called, so you should not be calling performSegue inside shouldPerformSegue. Delete that line, and see if that fixes the error – rdelmar Apr 07 '15 at 17:33
-
@pasta12 I will post the error here as picture, i edit the post again now, but i print screen it partially since the error is so long – jefferyleo Apr 07 '15 at 17:40
-
1You left out the actual error... – Fabio Ritrovato Apr 07 '15 at 17:42
-
@FabioRitrovato okay, top error I print screen again, sorry for that :) – jefferyleo Apr 07 '15 at 17:44
-
@FabioRitrovato done edited, you can take a look now – jefferyleo Apr 07 '15 at 17:45
3 Answers
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