6

在 IB 内部,在 View Effects Inspector 中,有一个设置 Core Animation Layer 的选项。如果我设置它会做什么?

查看效果检查器

是否相当于setWantsLayer:YES

如果是这样,那么根据Apple 文档 setWantsLayer可以在之前或之后调用setLayer:

The order that setWantsLayer: and setLayer: are called is important, it makes the distinction between a layer-backed view and a layer-hosting view.

如果我从 IB 设置 CALayer,会是哪个顺序?

4

1 回答 1

8

该复选框使您的视图具有图层支持setWantsLayer:(例如在没有的情况下调用setLayer:)。

于 2012-04-23T10:19:50.437 回答