Note that there are some explanatory texts on larger screens.

plurals
  1. POSwitching between view controllers
    text
    copied!<p>I have three view controllers. I used the flipsideproject template and then added another view controller. </p> <p>There is a button on the first view controller that goes to the second view controller. There is a button on the second view controller that goes back to the first one. When switching between the first and second, those buttons always work. </p> <p>It is the same situation with the second and third view controller. When I try to transfer between the first to second to third and then back to first, it does not work.</p> <p>(1-->2-->3-->2-/->1) My poorly drawn diagram depicts the situation. </p> <p>I had all of the back buttons connected to the back IBAction, which I thought was the problem. I then made another IBAction, but it has not fixed the problem. </p> <p>1st view controller = MainViewController 2nd VC = FlipSideViewController 3rd VC = ChooseAlarmSound </p> <p>This is for going 2->1 (this is the problem I think. It sometimes works) </p> <pre><code>- (IBAction)done:(id)sender { [self.delegate flipsideViewControllerDidFinish:self]; } </code></pre> <p>This is for going 2->3 </p> <pre><code>- (IBAction)chooseSound:(id)sender { ChooseAlarmSound *controller = [[[ChooseAlarmSound alloc] initWithNibName:@"ChooseAlarmSound" bundle:nil] autorelease]; controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:controller animated:YES]; } </code></pre> <p>This is for going 3->2 </p> <pre><code>- (IBAction)goBack:(id)sender { FlipsideViewController *controller = [[[FlipsideViewController alloc] initWithNibName:@"FlipsideViewController" bundle:nil] autorelease]; controller.modalTransitionStyle = UIModalTransitionStyleCoverVertical; [self presentModalViewController:controller animated:YES]; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload