RanLearns
RanLearns

Reputation: 4176

Animation - growing shrinking image scale

This seems like it should be easy enough, but I'm not able to figure out out tonight and have been searching but not finding anything relevant on the forums.

All I want to do is change the scale of a UIImageView to shrink it or grow it.

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];

image.whatDoIDoToMakeItGrowOrShrink?=)

[UIView commitAnimations];

Upvotes: 9

Views: 6678

Answers (1)

kennytm
kennytm

Reputation: 523154

imageView.transform = CGAffineTransformMakeScale(0.5f, 0.5f); // shrink to half.

Upvotes: 20

Related Questions