iOS scroller performance
coiin at verizon.net
Sun Mar 24 22:40:04 CDT 2013
I suspect that iOS tweens scrolling. It doesn't get scroll changes any more often than LiveCode, but it tweens the values rather than jumping to the newly reported value. That can give the illusion that it is getting more events, or handling them quicker.
Try this as a button script:
and have one field on the card, with no scrollbars showing, but lots of text in it. Put this script into the card:
on scrollto pFld,pScroll
put pScroll into finalscroll
put pFld into scrollingfield
put the scroll of field pFld into currentscroll
put (pScroll-currentscroll)/10 into scrolldiff
put 10 into scrollcount
subtract 1 from scrollcount
if scrollcount < 1 then
set the scroll of field scrollingfield to finalscroll
add scrolldiff to currentscroll
set the scroll of field scrollingfield to round(currentscroll)
send "scrollsome" to me in 1 ticks
It randomly scrolls the field, pretty smoothly.
So, don't scroll to the new value, just update a variable and then scroll towards that value 60 times per second.
More information about the use-livecode