iOS 8 AutoLayout scrollview scrolls horizontally on iPhone 6 plus

陌路散爱 提交于 2019-12-04 08:34:05

I finally found a proper way to let it work... I did it this way:

View hierarchy:
- UIView (Main view) - UIScrollView (which I wan of the same exact size of the Main view) - UIView (Container View containing all the stuff to be displayed in the scroll view)

Constraints:

Containar View:
- width equals to the one of the Main View - 0 leadin, trailing, top and bottom margin with superview (which is the Scroll View)

UIScrollView:
- width equals to the one of the Main View
- center view on X axis horizontally (center X)
- 0 top an bottom margin with superview

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