How to scale a CAShapeLayer
Asked Answered
R

1

5

In swift I've successfully made an animated bezier path which is contained inside a CAShapeLayer. My only problem is implementing it onto other screen sizes. Does anybody know how I can scale the CAShapeLayer with the path inside of it? i.e. make it half the original size.

Rohr answered 20/4, 2015 at 5:47 Comment(0)
S
11

Use this function:

 var shapelayer:CAShapeLayer
 shapelayer.transform = CATransform3DMakeScale(, ,)
Semite answered 20/4, 2015 at 5:53 Comment(1)
A simple solution is always best. Love it!Rohr

© 2022 - 2024 — McMap. All rights reserved.