I want to achieve the following with auto layout.
---------------------
| |
| |
| |
| ScrollView |
| |
| |
| |
| |
---------------------
| |
| Content |
| |
---------------------
The ScrollView has a width equal to the screen size and the content inside the ScrollView extends the screen. I do not want the user to be able to scroll horizontally.
I have tried
Put a
Viewinside of theScrollViewand set both of them to have leading, trailing, top, and bottom constraints to 0. Then I try to dynamically set the width of the Content andScrollViewto the ScreenSize.Simply surround my page's content in a
ScrollViewset it to have leading, trailing, top, and bottom constraints to 0. Then I try to dynamically set the width of theScrollViewto the ScreenSize.
Both of the following result in something like this...

Notice how everything is centered horizontally like I have set it up to be, yet the horizontal scrollbar is present and you can scroll into a blank screen.