Search code examples
cocoamacoscore-animationcalayercatransform3d

CATransformLayer: Autoresize sublayers to fill bounds?


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 to 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.


Solution

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