Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to scale a CAShapeLayer

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.

like image 713
Matt Spoon Avatar asked Apr 20 '15 05:04

Matt Spoon


1 Answers

Use this function:

 var shapelayer:CAShapeLayer
 shapelayer.transform = CATransform3DMakeScale(, ,)
like image 51
Leo Avatar answered Sep 30 '22 14:09

Leo