ios - Jittery / laggy UI updates while dragging UIScrollView -
i have uiscrollview
utilize purely it's contentoffset
. contentoffset
changes, subview's moved around according simple math function. mostly, entails having y positions adjusted, not linearly respect uiscrollview
's contentoffset.y
.
an illustration of adjusting yposition this:
cgrect newframe = subview.frame; newframe.origin.y = log(scrollview.contentoffset.y) + 300; [subview setframe:newframe];
everything works fine in simulator , works great on device while uiscrollview
isn't receiving touches (~24-30fps), while user touching screen , dragging, fps drops ~3-5fps. between dragging , not, there shouldn't difference, except in run loop, potentially. adjust that, i've tried in scrollviewdidscroll:
[self performselector:@selector(updatecards) onthread:[nsthread mainthread] withobject:nil waituntildone:yes modes:@[nsrunloopcommonmodes, uitrackingrunloopmode]];
and variations, no effect.
is there reason fps drop off , there can prepare issue? using ipod 5th generation of these tests.
ios objective-c uiscrollview drag nsrunloop
No comments:
Post a Comment