I have a UIScrollView and I want it to be able to scroll in both directions (it currently does) but only one at a time. So, for instance, if you start scrolling it horizonta
the simple way to achieve this is set the directionalLockEnabled to YES and implement the UIScrollerView delegate like this
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView.contentOffset.x != 0 &&
scrollView.contentOffset.y != 0) {
scrollView.contentOffset = CGPointMake(0, 0);
}
}