Hello!
I'm using nested UIScrollViews to implement a bidimensional list whose lines and columns are navigated independently. Both lines and columns use UICenterOnChild with a threshold. Now, I notice that only the x value of the touch delta is used to check the threshold. It seems it was implemented as an answer to the use case described in the following thread, which only uses horizontal "pages" :
http://www.tasharen.com/forum/index.php?topic=6999.msg33013#msg33013I think this might be a bug? Maybe I'm missing something here, but I modified UICenterOnChild.Recenter() to check UIScrollView.Movement and pick either the x or y component of the delta for Horizontal and Vertical scroll views, and the magnitude for Unrestricted. Works great for me! I'm not sure what Custom should use though. I will leave that up to you as we don't have a use for it as of yet.

Here's the code I added to the nextPageThreshold conditional:
float directionDelta;
switch (mScrollView.movement)
{
case UIScrollView.Movement.Horizontal:
{
directionDelta = delta.x;
break;
}
case UIScrollView.Movement.Vertical:
{
directionDelta = delta.y;
break;
}
// Unrestricted and Custom (?)
default:
{
directionDelta = delta.magnitude;
break;
}
}
//if (directionDelta > nextPageThreshold)
//...
On a side note, I think that the term "page" is slightly confusing, as it is clearly UI-related but isn't officially used by NGUI. Maybe "child" or "item" would be more appropriate?
Thanks!