Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: dustinRodda on June 30, 2014, 09:35:38 AM
-
I am trying to create an infinite scrolling list using UIWrapContent. I am running into an issue where all the children in my WrapContent get centered inside of the ScrollView. I would really like to start the list at the top of the ScrollView instead. I have tried repositioning the children in the WrapContent and the WrapContent itself through code, but neither solved the issue. Any suggestions?
-
Move the object that has UIWrapContent higher so that it's at the top of the scroll view.
-
I have tried that. Here is my setup. The first two are from the inspector the third is the location of the wrap content in the scene. I am using the structure from Example Project 14.
-
That looks correct to me and I see you are already using the 14th example as a reference, so that's good. Can you post a pic of what it looks like when you populate the content? From what I see it should behave just like the lists in the example -- first item will be at the same position as the wrap content object, and others will be below it.
-
here is what it looks like after population. The position of the wrap content is at the top of the window as suggested.
-
Alright, so where is your UIWrapContent object positioned? All children will start at that object's transform position and move either down or right, depending on the scroll view's direction. If you move that object, its children will move with it. You said you tried that, but why didn't it work then? It's just an object. Moving it around will move its children.