Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set Width & Height alone on Views in iPhone Development

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 is something called CGSizeMake, but I am not able to make it work.

like image 321
ChethanRao Avatar asked Jan 22 '23 01:01

ChethanRao


1 Answers

Try with this.

CGRect aFrame = image.frame;

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

image.frame = aFrame;
like image 99
emenegro Avatar answered Jan 26 '23 06:01

emenegro