如何使用自动布局改变的UIView的高度? [英] How to change uiview's height using auto layout?

查看:393
本文介绍了如何使用自动布局改变的UIView的高度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我才能了解根据其内容的高度如何提高意见创造了这个方案。但是我还是没能做到这一点。

So I created this scenario in order to understand how views increase in height according to their content. However am still not able to make it happen.

这是我现在:

TextView的是根据内容越来越多。然而,它包含了UIView正在消失。我应该用什么样的限制,这样,当UITextView的变大,其母公司观点也增加高度?

the textview is growing according to content. however the uiview containing it is disappearing. what constraints should I use so that when the uitextview becomes bigger, its parent view also increase in height?

推荐答案

在UITextView的让你你未选定这些

ON UITextView make your you unselected These


  • 滚动启用

  • 跳动

  • 跳出水平

  • 垂直弹跳

  • 显示水平指示器

  • 显示垂直指示器

现在改变你这样的自动布局约束。

Now Change your auto layout constraints like this.

这篇关于如何使用自动布局改变的UIView的高度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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