佚名通过本文主要向大家介绍了c#控件大小,android设置控件大小,mfc设置控件大小,mfc控件大小,qt设置控件大小等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: ios UIImageView 加载网络图片控件大小发生改变,这么解决?
描述:
解决方案1:
描述:
我在tableView中加载图片 其中某一行的高度高一点 图片的也变大了一些 但是其他的控件大小怕不变。
解决方案1:
假如记得没错的话,cell.imageView是会被resize到cell的行高。
我的当时做法是
- (void)layoutSubviews
{
[super layoutSubviews];
int fixWidth = 120;
int fixHeight = 30;
self.imageView.frame = CGRectMake(20, 5, fixWidth, fixHeight);
}
不知道是layout的处理,还是autoresize的处理,假如是autoresize,可以尝试下更改imageview的autoresizeMask