2010-11-17 140 views
0

具有CATiledLayer的UIViews是否具有动画?无法正确显示CATiledLayer的视图

如果我调用以下:

[myContentView setNeedsDisplay]; 

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

如果UIView是一个没有CATiledLayer的“正常”UIView,这将工作得很好。然而,只要我添加一个CATiledLayer类型的子图层,动画就无法正常工作。 页面翻转工作,但底层页面不显示(只是空白),直到动画完成。

我试过[myContentView setNeedsDisplay];之前,之后,甚至在动画块的中间。如果myContentView具有CATiledLayer,则没有区别。

任何帮助表示赞赏。

回答

0

想通了:

cache:YES];

设置为NO