Note that there are some explanatory texts on larger screens.

plurals
  1. POStop UITableView Animation on push to UINavigationController
    text
    copied!<p>I'm pushing a view controller that contains a tableiview onto my uinavigation controller:</p> <pre><code>CourseMenuViewController *mvc = [[[CourseMenuViewController alloc] initWithSlidingNavigationcontroller:self.slidingNavigationController] autorelease]; mvc.course = course; [self.navigationController pushViewController:mvc animated:YES]; [self.navigationController setNavigationBarHidden:NO animated:NO]; </code></pre> <p>So far so good, everything works as expected. My issue occurs when I watch the animation and see all of my table view rows animate down from the top of the screen as the view is animating in from the left. This makes it feel like the view is moving from the top-left corner to the bottom-right corner in a diagonal path.</p> <p>My question is, how can I make the table view just appear instead of animating? I should add that all of my cells are static so I'm not waiting on any data from a NSFetchedResultsController or anything like that.</p> <p>roronoa below put me on the right path, and here is the now working version:</p> <pre><code>CourseMenuViewController *mvc = [[[CourseMenuViewController alloc] initWithSlidingNavigationcontroller:self.slidingNavigationController] autorelease]; mvc.course = course; CATransition *caTransition = [CATransition animation]; caTransition.duration = 0.35; caTransition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; caTransition.delegate = self; caTransition.type = kCATransitionPush; caTransition.subtype = kCATransitionFromRight; [self.navigationController.view.layer addAnimation:caTransition forKey:nil]; [self.navigationController pushViewController:mvc animated:NO]; </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