Views in ScrollView doesn't respect constraint

2019-08-22 06:24发布

I added a ScrollView to my View Controller. 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:

enter image description here

And sometimes I get this, why?

enter image description here

When I don't use Scroll View, all works perfectly.

1条回答
甜甜的少女心
2楼-- · 2019-08-22 06:44

Control drag from the mapView to the outer main View and select Equal-Widths

查看更多
登录 后发表回答