问题
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