Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: comcipher on July 18, 2014, 09:45:06 AM

Title: Variable landscape height
Post by: comcipher on July 18, 2014, 09:45:06 AM
I'm working on a game that runs in landscape on both iPhone and iPad.  I'd like to vary the height of the scroll view based on which device the player is on.  For example, on iPad you may see 6 items vertically in the scrollview, but on iPhone 5 you may only see 4.  The relative size of the elements in the scrollview would remain the same. 

Usually I used fixed size on UIRoot to keep everything the same relative size, but in this case I want to show more vertically on one platform vs the other.  Any ideas?

Thanks in advance!

Title: Re: Variable landscape height
Post by: ArenMook on July 19, 2014, 10:49:06 AM
You can still use a fixed size UIRoot, then just adjust the manual height. This would be more predictable than leaving the UIRoot as Pixel Perfect. The scroll view can then be anchored, and would resize automatically.