I've been unable to find an answer for this (maybe someone has hacked a solution together).
Is it possible to disable scrolling in a UIScrollView in one direction? I am not talking about disabling vertical or horizontal scrolling, but one direction only. So for example, in a UIScrollView, I want to be able to drag the scrollview in a downwards direction, but not in an upwards direction
Thanks
An alternative might be:
But remember that this will only work for the scrollViews, which have a bigger content than their frames.
The above solutions will reset you to zero,zero if the user accidentally scrolls vertically. Try this...
This works for me:
If you set the contentSize of the scroller equals to the size of the content, in one of the direction, the scroll will disappear in that direction because there will be nothing to scroll.
Fortunately, we can use scrollRectToVisible to avoid jittery behavior after the scroll has been limited:
Turns out a simple solution was actually possible and easy: