Reputation: 2834
I designed a UI in Xcode with a ScrollView and added constraints to it. In Interface designer it looks as I want, but running it with the simulator causes a big spacing at the right side of the ContentView inside the ScrollView.
Here are two pics to show what I mean
So what did I do wrong here?
Thanks for your helping hand
The ContentView needed the same width than the View. So select both, go to your constraints and select "Equal Widths".
Upvotes: 0
Views: 117
Reputation: 1053
I had this same issue after updating to xcode 8+. ScrollView started to act strange. For now I am adding constrains from inside scrollView to another view witch isn't in scrollView itself (like leading, trailing) to mainView.
Upvotes: 0
Reputation: 116
It looks to me as though you haven't added constraints to the scroll view (ScrollViewer) to pin its edges to its parent view (View).
Upvotes: 0