Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: moghes on February 23, 2015, 06:14:45 AM
-
Hello,
I have a scroll view which start with 0 items, and the user adds throughout the game, meaning I do not have a fix number of items
for my scroll view.
I am facing a problem making the scroll view stop its scrolling property when not needed, ie when my vertical list fits 5 items and I only
have 2 or 3 items, no need to scroll them and let them be sorted from top to down until they dont fit and scrolling will be enabled.
Is this doable? and if yes any hint or link or tutorial please.
Thanks,
moghes
-
Well there's a partial solution like we count the number of items which fit vertically and enable the scroll when item count exceeds max number,
but this is not the optimal solution since it will differ a bit from device to another, also max number will change every time we use this tecnique since
each item (row) will have a different vertical height.
so I am searching for a dynamic method, to tell me that the items do not fit without a scroll.
Thanks.
-
"Cancel Drag If Fits" is an option on the UIScrollView.
-
Wow that was so simple and many thanks :D