Matt Spoon
Matt Spoon

Reputation: 2830

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.

Upvotes: 5

Views: 3371

Answers (1)

Leo
Leo

Reputation: 24714

Use this function:

 var shapelayer:CAShapeLayer
 shapelayer.transform = CATransform3DMakeScale(, ,)

Upvotes: 11

Related Questions