问题描述
在IB中,在View Effects Inspector中,有一个选项设置Core Animation Layer。如果我设置它做它做什么?
是否等同于 setWantsLayer:YES
?
$ b b
如果是这样,则根据 setWantsLayer
。
调用setWantsLayer:和setLayer:的顺序非常重要,它可以区分层支持视图和层主视图。
如果我从IB设置CALayer,它的顺序是什么?
复选框使您的视图层支持(像调用 setWantsLayer:
c $ c> setLayer:)。
Inside IB, in View Effects Inspector, there is an option to set Core Animation Layer. If I set it what does it do?
Is it equivalent to setWantsLayer:YES
?
If so then as per Apple docs setWantsLayer
can be called before or after 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.
If I set CALayer from IB, which order would it be?
The checkbox makes your view layer-backed (like calling setWantsLayer:
without setLayer:
).
这篇关于在Interface Builder中的View Effects Inspector中选择CALayer的作用是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!