Prevent diagonal scrolling in UIScrollView?

Posted by NickD on Stack Overflow See other posts from Stack Overflow or by NickD
Published on 2009-04-07T23:44:00Z Indexed on 2010/06/05 19:32 UTC
Read the original article Hit count: 434

Filed under:
|
|

How can I force a UIScrollView in which paging and scrolling are on to move vertically or horizontally only?

My understanding is that the directionalLockEnabled property should achieve this, but a diagonal swipe still causes the view to scroll diagonally instead of restricting motion to a single axis.

Edit: to be clearer, I'd like to allow the user to scroll horizontally OR vertically, but not both simultaneously.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c