在Interface Builder中的View Effects Inspector中选择CALayer的作用是什么? [英] What does selecting CALayer in View Effects Inspector inside Interface Builder do?

查看:164
本文介绍了在Interface Builder中的View Effects Inspector中选择CALayer的作用是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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





是否等同于 setWantsLayer:YES


$ b b

如果是这样,则根据可以在 setLayer:之前或之后调用Apple docs 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的作用是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆