[英]Minimum size for UITableViewCell with AutoLayout
I was following this tutorial on how to create UITableViewCell
with UILabel
inside fit the height of it's content and it's working great! 我一直在关注本教程, 该教程介绍如何使用内部的
UILabel
创建UITableViewCell
使其适合其内容的高度,并且效果很好!
I have just one little problem: I want to make a default minimum size for the UITableViewCell
that will not let the Cell
to get resized if the content height is smaller than this minimum size. 我只有一个小问题:我想为
UITableViewCell
设置默认的最小大小,如果内容高度小于此最小大小,则该大小将不允许Cell
调整大小。
How could I do that? 我该怎么办?
Thanks in advance. 提前致谢。
You can set a minimum size by setting the constraint's relation
to be Greater Than or Equal
. 您可以通过将约束的
relation
设置为Greater Than or Equal
来设置最小大小。
Chances are your height constraint is just Equal
. 您的身高限制可能就是
Equal
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.