[英]How to show the full Image in Table view cell when we posted something Like Facebook
这是我的代码:
cell.ImageViewPost.contentMode = UIViewContentModeScaleAspectFit;
cell.ImageViewPost.clipsToBounds = YES;
BaseURLIMG =[baseImageURl stringByAppendingString:[[ArrTotalResult valueForKey:@"post"]objectAtIndex:indexPath.row]];
[cell.ImageViewPost setImageWithURL:[NSURL URLWithString:BaseURLIMG] placeholderImage:nil];
我的图像未完全显示为单元格框架。 我们需要完全像Facebook帖子一样显示,其中发布的图片以全视图显示。
确保imageViews框架是单元格的大小(或所需的大小)
尝试将contentMode更改为UIViewContentModeScaleAspectFill
。 如果图像仍然不是您想要的尺寸,则这是因为图像的高宽比与imageView的高宽比不同,因此会发生某些裁剪。 要停止此操作,请使用UIViewContentModeScaleToFill
,它可以更改图像的长宽比以匹配imageView,但可以使图像变形。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.