clip to bounds 和mask to bounds

1.maskToBounds是CALayer的属性,clipsToBounds是UIView新的属性。
2.两者在大多数场景使用效果一样。
3.clipsToBounds会调用maskToBounds方法。
clipsToBounds会讲控件上的所有子控件超出父控件的部分裁掉

你可能感兴趣的:(clip to bounds 和mask to bounds)