How to merge multiple CAShapeLayers into one in swift
Asked Answered
F

0

8

I've got multiple bezier paths which are incorporated into CAShapeLayers for animation purposes. I need to know if it is possible to merge all of the layers into one collection object so that I can scale it in the following way:

shapes.transform = CATransform3DMakeScale(2, 2, 1)

Does anybody know how to do this?

Forcefeed answered 20/4, 2015 at 16:45 Comment(3)
If you apply the transform to the layers' super layer, does it apply the transfer to them all?Cariecaries
I don't know, I'll have a tryForcefeed
If the shapes have the same properties (stroke width, fill color, line caps etc.) you can construct a single path. Another solution is applying the transform to each layer.Graveyard

© 2022 - 2024 — McMap. All rights reserved.