Note that there are some explanatory texts on larger screens.

plurals
  1. POUIButton click crashes app
    text
    copied!<p>I have button on <code>page 1</code> when i click on button i am performing some animation and navigation to new page say <code>Page 2</code>. </p> <p>On <code>page 2</code> there is cancel button when i click on that i want to go back to my previuos page i.e <code>Page 1</code> but on click of cancel button my app crashes.</p> <p>Here is my sample code on <code>Page 1:</code><strong>Name of page CRViewController</strong></p> <pre><code>- (IBAction)ClickMe:(id)sender { RegistraionViewController *secondController = [[RegistraionViewController alloc] init]; CATransition *transitionAnimation = [CATransition animation]; [transitionAnimation setDuration:1]; [transitionAnimation setType:@"push"]; [transitionAnimation setSubtype:kCATransitionFromBottom]; [transitionAnimation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]]; [self.view.layer addAnimation:transitionAnimation forKey:kCATransitionFromBottom]; [self.view addSubview:secondController.view]; } </code></pre> <p>Code which is on <code>Page 2:</code> <strong>Name of page RegistraionViewController</strong> (on Which crashes on click.)</p> <pre><code>- (IBAction)Click:(id)sender { CRViewController *secondController = [[CRViewController alloc] init]; CATransition *transitionAnimation = [CATransition animation]; [transitionAnimation setDuration:1]; [transitionAnimation setType:@"push"]; [transitionAnimation setSubtype:kCATransitionFromTop]; [transitionAnimation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]]; [self.view.layer addAnimation:transitionAnimation forKey:kCATransitionFromBottom]; [self.view addSubview:secondController.view]; } </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