0

带有 CATiledLayer 的 UIView 可以有动画吗?

如果我调用以下内容:

[myContentView setNeedsDisplay];

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

如果 UIView 是没有 CATiledLayer 的“普通”UIView,这将很有效。但是,一旦我添加了 CATiledLayer 类型的子图层,动画就无法正常工作。翻页有效,但在动画完成之前不会显示底层页面(只是空白)。

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

任何帮助表示赞赏。

4

1 回答 1

0

弄清楚了:

缓存:是];

设置为否

于 2010-11-18T23:06:23.820 回答