UITableViewCell高度问题 [英] UITableViewCell Height Issue

查看:56
本文介绍了UITableViewCell高度问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实际上是在尝试使图像视图的高度动态化

I'm actually trying to make the image view height dynamic

我尝试了 UITableViewAutomaticDimension

在单元格类中,我已根据纵横比约束设置了图像的动态高度

in the cell class I have set the image's dynamic height based on the aspect constraint

推荐答案

好吧,基于图像的约束,您不能使用 UITableViewAutomaticDimension 实现单元格的动态高度.

Well, you can't achieve the dynamic height of cell with UITableViewAutomaticDimension on the basis of image's constraints.

图像的高度和宽度可以帮助您解决此问题.以下答案提供了有关此问题的大量帮助:

BUT image's height and width can help you in this. There is a plenty of help regarding this issue is available in following answer:

UITableView中的动态UIImageView大小

这篇关于UITableViewCell高度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆