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
The most obvious solution is to forbid y-coordinate changes in your subclass.
override var contentOffset: CGPoint {
get {
return super.contentOffset
}
set {
super.contentOffset = CGPoint(x: newValue.x, y: 0)
}
}
This is the only suitable solution in situations when: