I first tried disabled the scroll bar by setting:
scrollView!.hasHorizontalScroller = false
and that successfully worked, but I could still scroll from left to right by using my trackpad. Is there a way to ensure that horizontal scrolling is completely disabled for an NSScrollView object?
Even with a correct content size, I was still able to use two-finger gestures to scroll horizontally a bit before it snaps back into place. To fix this, you can set the elasticity:
scrollView.horizontalScrollElasticity = .None
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With