ios ScrollView 具有不明确的可滚动内容高度
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24408256/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ScrollView has ambiguous scrollable content height
提问by Madu
I am making a very basic UIScrollView test. Here is my setup It shows me the following AutoLayout error:
我正在做一个非常基本的 UIScrollView 测试。这是我的设置它显示了以下 AutoLayout 错误:
ScrollView has ambiguous scrollable content height
回答by Sandy Chapman
You need to ensure you've got a chain of vertical spacing constraints from the top of the scroll view through all your elements to the bottom of the scroll view.
您需要确保从滚动视图顶部到所有元素到滚动视图底部都有一系列垂直间距约束。
Once you do that, your warning/error should go away.
一旦你这样做了,你的警告/错误就会消失。