在 Interface Builder 中的 View Effects Inspector 中选择 CALayer 有何作用?

2024-04-18

在IB内部,在View Effects Inspector中,有一个设置核心动画层的选项。如果我设置了它会做什么?

是否相当于setWantsLayer:YES?

如果是这样,那么按照苹果文档 https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/nsview_Class/Reference/NSView.html 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,会是什么顺序?


复选框使您的视图层支持(比如打电话setWantsLayer:没有setLayer:).

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 Interface Builder 中的 View Effects Inspector 中选择 CALayer 有何作用? 的相关文章

随机推荐