iOS scroller performance

Scott Rossi scott at tactilemedia.com
Mon Mar 25 00:49:25 EDT 2013


On 3/24/13 9:36 PM, "Monte Goulding" <monte at sweattechnologies.com> wrote:


>
>On 25/03/2013, at 2:42 PM, Scott Rossi wrote:
>
>> If you have nested groups, the layerMode needs to be set to scrolling
>>for
>> the topmost (outermost) group, and the group that actually scrolls
>>cannot
>> be nested inside another group.  With this set up, you should get good
>> performance.
>
>Wait... so you can only set the scroll of a group that is directly on the
>card then? That makes it quite difficult to use...

Yup.


>Where did you learn that the scrolling group can't be inside another
>group? I've just confirmed it using the effective layermode but I can't
>see it documented...

This used to be in the iOS release notes, early on.  Doesn't appear to be
in the 5.5.4 notes.


>I think this means for scrolling fields in a custom control you need to
>set their height to the formatted height and then just scroll the group.
>I think I can workaround this for datagrids in mergDataGridScroller too...

Whatever you're changing the scroll of needs to be the outermost group or
a top-level control.  I believe the way the scroller works is a group's
contents are essentially turned into an image, and that image is scrolled
within the clipped region of the group.  You'll notice if you try to
modify the contents of the group while it is scrolling, you'll either get
crappy performance, or it flat out won't work.  This makes it impossible
to use native scrolling for things such as carousels whose contents change
while scrolling occurs.

Of course, I'd be quite happy to hear if someone knows otherwise.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design






More information about the use-livecode mailing list