I have a view controller whose job is to display a large image, initially sized to fit the screen, which the user can pan and zoom. The image was taken with phone's camera, then saved to the device and reloaded using +[UIImage imageWithData:]
.
I show the controller in a navigation stack, but I use a fading transition like this:
SGBImageController *imageController = [[[SGBImageController alloc] init] autorelease];
imageController = <theImage>;
[imageController loadView];
[UIView transitionWithView:self.navigationController.view
duration:0.33
options:UIViewAnimationOptionAllowAnimatedContent
|UIViewAnimationOptionTransitionCrossDissolve
animations:^{
[self.navigationController pushViewController:imageController animated:NO];
} completion:nil];
The fade animation should be smooth, but it's jerky, and looking in instruments I see it's spending all its time in CA::Layer::Render
. I've added the loadView
line to try to force it to show its view, but it hasn't helped. How do I make a view controller draw itself before it is animated?