[英]iOS resize UIImageView to fit for UILabel
I have a UILabel with dynamic height. 我有一个具有动态高度的UILabel。 I am trying to place it within bubble image.
我正在尝试将其放置在气泡图像中。 How do I resize UIImageView to fit for UILabel?
如何调整UIImageView的大小以适合UILabel?
You need to set 2 constraints: 您需要设置2个约束:
Additionally, you may want to add the following constraints: 此外,您可能需要添加以下约束:
See this documentation to learn how to add contraints programatically. 请参阅此文档以了解如何以编程方式添加约束。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.