可以将单个CALayer用作其他多个层的遮罩吗? [英] Can a single CALayer be used as the mask for multiple other layers?

查看:60
本文介绍了可以将单个CALayer用作其他多个层的遮罩吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在文档中找不到任何指示单个CALayer(或子类)是否可以用作其他多个层的mask属性的内容.是否有可能?还是未定义?

I can't find anything in the docs that indicates whether a single CALayer (or subclass) can be used as the mask property for multiple other layers. Is it possible? Or undefined?

推荐答案

我的实验表明不能.最终将作为附加到其上的最后一层的遮罩,并且之前被指定为遮罩的所有先前层将还原为默认的遮罩值.

My experimentation says that it cannot. It will end up as the mask for the last layer it is attached to, and any previous layers it was assigned as a mask to, will revert to the default value of mask.

这篇关于可以将单个CALayer用作其他多个层的遮罩吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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