Views in ScrollView doesn't respect constraints

坚强是说给别人听的谎言 提交于 2020-01-06 04:36:16

问题


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:

And sometimes I get this, why?

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


回答1:


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



来源:https://stackoverflow.com/questions/48708331/views-in-scrollview-doesnt-respect-constraints

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!