Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: safety on June 20, 2014, 02:48:25 AM
-
I’m trying to dynamically populate a scrolling UITable (1 column) with text downloaded from a server. My approach is to create text labels dynamically, set their width to apply line-wrapping, then add them to the table. Depending on when this is done, the text label's position seems to jump around the place, making it difficult to know what the table offset into the scrollview should be. I don’t know how wide the scrollview is going to be until it is sized (OnEnable), so I can’t hardcode an offset.
Is there a recommended way to do this?
-
After setting your label's content you should call Reposition() on the table so that everything is positioned correctly. Are you doing that?
-
After adding a call to Reposition() on the UITable and ResetPosition() on the UIScroll it appears to set the text position consistently. Thanks!