开发者

set Width & Height alone on Views in iPhone Development

开发者 https://www.devze.com 2022-12-31 12:30 出处:网络
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 f

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 wid开发者_如何学Cth & height alone? There is something called CGSizeMake, but I am not able to make it work.


Try with this.

CGRect aFrame = image.frame;

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

image.frame = aFrame;
0

精彩评论

暂无评论...
验证码 换一张
取 消