NUCLiOS IGGridView QuickTip: Limit Scroll Direction

Stephen Zaharuk / Monday, October 13, 2014

Did you know that the IGGridView derives directly from UIScrollView? Because of this, you actually have a lot of power. In fact, the IGGridView turns on one of the settings of the UIScrollView, and you might not even realize it. 

By default, the IGGridView limits the scrolling direction. What i mean by that, is that if you start scrolling in one direction(lets say vertically), then you won't scroll horizontally until the vertical scrolling is done. Likewise, when your scrolling horizontally, you won't scroll vertically. We enable his feature by default, b/c if you're have a grid that scrolls in both directions and you start scrolling fast in a single directly, you most likely don't wan the IGGridView to start drifting in another direction. 

However, there maybe be cases where you do want this behavior. So how do you enable it?

Well, its really simple, just one property:

_gridView.directionalLockEnabled = NO;

Hope this was helpful

-SteveZ