0
votes

Can UIViews with a CATiledLayer have animations?

If I call the following:

[myContentView setNeedsDisplay];

CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationTransition: UIViewAnimationTransitionCurlUp forView:self.view cache:YES];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:10]; [UIView commitAnimations];

This will work well if the UIView is a "normal" UIView without a CATiledLayer. However as soon as I add a sublayer of type CATiledLayer, the animations does not work correctly. The page flip works, but the underlying page is not shown (just blank) until the animation is finished.

I have tried [myContentView setNeedsDisplay]; before, after and even in the middle of the animation block. No difference if myContentView has a CATiledLayer.

Any help appreciated.

1

1 Answers

0
votes

Figured it out:

cache:YES];

Set to NO