Cannot animate view with CATiledLayer correctly
Can UIViews with a CATiledLayer have animations?
If I call the following:
[myContentView setNeedsDisplay];
CGContextRef context = UIGraphic开发者_运维知识库sGetCurrentContext();
[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.
Figured it out:
cache:YES];
Set to NO
精彩评论