1
如何更改objective-c中UIImageView的宽度?目前,我这样做:更改UIImageView的宽度
imageview.frame = GCRectMake(x,y,width,height);
但是,当我改变宽度似乎只是改变位置而不是改变大小。
如何更改objective-c中UIImageView的宽度?目前,我这样做:更改UIImageView的宽度
imageview.frame = GCRectMake(x,y,width,height);
但是,当我改变宽度似乎只是改变位置而不是改变大小。
试试这个:
CGRect frame = [imageView frame];
frame.size.width = newWidth;
[imageView setFrame:frame];