Take the 2-minute tour ×

Hey guys, I am working on an iPhone project where i need to change the width and height of a UIImageView dynamically. I have come across CGPointMake to change x & y positions alone, but what should i use for changing width & height alone??. There's something called CGSizeMake but i am not able to make it work. Can someone help...any idea abt this....???.. Thanks.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Try with this.

CGRect aFrame = image.frame;

aFrame.size.width = newWidth;
aFrame.size.height = newHeight;

image.frame = aFrame;
share|improve this answer
add comment

Your Answer


