- Home /
NGUI(UIDraggablePanel) : Determine if user has scrolled to end of table
Hi NGUI Users,
i have already posted this question on NGUI forums, but i was not getting good response there so i thought of putting it directly on unity forums.
Back to question now,
I'm making a paging system (sort of like Facebook) where the content loads when the user scrolls to the bottom.So to implement that initially i am adding my PostPrefabs dynamically to a UIDraggablePanel(UITable also attached) and everything is working absolutely fine but how can i determine that the user has reached bottom of the list so that i can load further data and add it to the drag-able panel.
i know that UIDraggablePanel.RestrictWithinBounds function -- particularly has "if (constraint.magnitude > 0.001f)" part which could help determine with some minor modifications, if it's is at end of list or not but it only returns a positive value so it is not known whether it is at top end or bottom end.