There is an option in IB to uncheck vertical scrolling on a scrollview, but it doesnt seem to work.
How can the scrollview be set to only scroll horizontally, and no
From iOS11 one can use the following property
let frameLayoutGuide: UILayoutGuide
If you set constraints for frameLayoutGuide.topAnchor and frameLayoutGuide.bottomAnchor to the same anchors of some subview of your scrollView then vertical scroll will be disabled and the height of the scrollView will be equal to the height of its subview.