[英]Views in ScrollView doesn't respect constraints
I added a ScrollView to my View Controller. 我向我的视图控制器添加了一个ScrollView 。 Then, I created constraints between my inner elements and the scroll view itself, but I don't understand why my yellow view for example is not taking the full width.
然后,我在内部元素和滚动视图本身之间创建了约束,但是我不明白为什么例如我的黄色视图没有采用整个宽度。
Here is the screenshot of my view and constraints: 这是我的视图和约束的屏幕截图:
And sometimes I get this, why? 有时我明白了,为什么?
When I don't use Scroll View, all works perfectly. 当我不使用“滚动视图”时,一切都可以正常运行。
控制从mapView拖动到外部主视图,然后选择Equal-Widths
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.