1

I have created two table in UIView controller and given scroll to both. I only want Horizontal and Verital movement in table NO DIAGONAL movement ?

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {

if (scrollView == _programGuideTable) {
    _channelGuideTable.contentOffset = CGPointMake(_channelGuideTable.contentOffset.x, _programGuideTable.contentOffset.y);

    return;
}
if (scrollView == _channelGuideTable) {
    _programGuideTable.contentOffset = CGPointMake(_programGuideTable.contentOffset.x, _channelGuideTable.contentOffset.y);

    return;
}
}

Now my question is how to disable or stop diagonal scrolling ?

  • I dont think it is posiible to stop diagonal scrolling because user swipe might not be perfectly horizontal or vertical. – chatur Jan 09 '12 at 12:45
  • 1
    please visit to this link [prevent dioganal scrolling ][1] [1]: http://stackoverflow.com/questions/728014/uiscrollview-paging-horizontally-scrolling-vertically – iOSPawan Jan 09 '12 at 12:47

0 Answers0