I have an app that is almost running perfectly. Here is how my app is structured:
6 total View Controllers on the storyboard. The first 3 View Controllers are the most important. The initial View Controller has buttons to "Login" and "Signup". The "Login" button modally presents a Login View Controller and the "Signup" button modally presents a Signup View Controller.
The Signup View Controller has 3 fields for username, password, and email and then a "submit" button. The submit button submits the data to my web server and if everything submits successfully it calls the "performSegueWithIdentifier" method on itself.
Here is the statement:
[self performSegueWithIdentifier:@"superSegue" sender:self];
I spent 2 hours tonight trying to get the above method call to work and it finally does work. To get it to work, I had to select my Signup View Controller on the storyboard and go to Editor > Embed In > Navigation Controller (If I remember correctly I had to do this because the signup view controller is presented modally). I then dragged from my Signup View Controller's submit button to the View Controller I want to push to and selected Push and then typed in an identifier name.
Anyways, all of the above works perfectly fine until I try to use the back button on the View Controller that we pushed to using the method call. If I tap the back button, it goes to a 90% black screen with a blank nav bar at the top with a back button and of course that back button does nothing as well.
This is the error that I get in the console:
Unbalanced calls to begin/end appearance transitions for <VerificationViewController: 0x14ed1bb0>
Verification View Controller is the View Controller that the Signup View Controller pushes to via the performSegueWithIdentifier method.
Does anyone know how I can fix this error?
I have included a screenshot below of what my storyboard looks like in xcode. There is a view controller that I have coded but not connected yet and shouldn't make a difference anyways so you can ignore the View Controller to the right of the Login VC.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…