Registered User
Registered User

Reputation: 3699

Scale the size of CALayer contents

I have a few UIImageViews inside CALayer. How do I scale them all at once? I did try setting CALayer properties like la.contentsGravity = @"kCAGravityResizeAspect"; but the images inside the layer always display the original size.

Upvotes: 24

Views: 25057

Answers (1)

vikingosegundo
vikingosegundo

Reputation: 52227

if layer contains the image, this will scale it to 65%

layer.transform = CATransform3DMakeScale(.65, .65, 1);

Upvotes: 70

Related Questions