Tasharen Entertainment Forum

Support => Misc Archive => Topic started by: vipo on April 04, 2014, 04:57:16 PM

Title: Runtime dynamic scrollview
Post by: vipo on April 04, 2014, 04:57:16 PM
solved
Title: Re: Runtime dynamic scrollview
Post by: ArenMook on April 04, 2014, 10:42:24 PM
Scroll views have an origin point. If set, the content will originate there. So set it to top left and your content will be top-left aligned. You will need to call UIScrollView's ResetPosition() function after changing the content.
Title: Re: Runtime dynamic scrollview
Post by: ArenMook on April 04, 2014, 10:54:45 PM
Right, so choose Center origin point. :P
Title: Re: Runtime dynamic scrollview
Post by: ArenMook on April 05, 2014, 11:41:35 AM
Yes, you need to update.
Title: Re: Runtime dynamic scrollview
Post by: ArenMook on April 05, 2014, 12:00:50 PM
Yes. Update. There is an example of an infinite scroll view. :P
Title: Re: Runtime dynamic scrollview
Post by: ArenMook on April 06, 2014, 02:35:28 AM
UIWrapContent already does what grid used to do. Grid repositions children. So does Wrap Content.

Remove the UIGrid.
Title: Re: Runtime dynamic scrollview
Post by: ArenMook on April 06, 2014, 01:37:52 PM
Not sure what you need explained to be honest. Add content as children of the object that has the wrap script, and it makes wrapping work on its own.
Title: Re: Runtime dynamic scrollview
Post by: ArenMook on April 07, 2014, 11:19:54 PM
If you need multiple rows, then organize your content like this:

UIWrapContent
- Row 1 (UIGrid)
-- Item 1
-- Item 2
-- Item 3
- Row 2 (UIGrid)
-- Item 4
-- Item 5
-- Item 6
Title: Re: Runtime dynamic scrollview
Post by: ArenMook on April 09, 2014, 03:27:49 AM
If you are adding content dynamically you need to let UIWrapContent know by calling its WrapContent() function.