开发者

CATransformLayer: Autoresize sublayers to fill bounds?

开发者 https://www.devze.com 2023-02-08 11:42 出处:网络
Is there any way to have the sublayers of a CATransformLayer automatically scale to fill the bounds of the CATransformLayer when animating? I\'ve already tried setting the autoresizingMask property an

Is there any way to have the sublayers of a CATransformLayer automatically scale to fill the bounds of the CATransformLayer when animating? I've already tried setting the autoresizingMask property and also using CAConstraintLayoutManager but neither seem to have any effect.

The reason I want t开发者_如何学JAVAo do this is because I'm doing a 3D rotation + enlarge animation on the CATransformLayer, and the enlarge is not working because the sublayers aren't scaling to fill the bounds as it animates.


I eventually ended up just manually resizing the sublayers of the transform layer as it animated.

0

精彩评论

暂无评论...
验证码 换一张
取 消