iphone - Many UIView animation causing performance problem? -


i have object animation... if there many(more 25) objects doing animation @ same time causing jerk while dragging... creating animation using below code in each object. how can improve performance?

#define default_anim_spped 0.6 #define infinate_value 1e100f  - (void)startanimating {     mbackgroundimageview.frame = moriginalframe;     [uiview beginanimations:nil context:nil];      [uiview setanimationrepeatautoreverses:yes];     [uiview setanimationrepeatcount:infinate_value];     [uiview setanimationduration:default_anim_spped];         cgrect tempframe=mbackgroundimageview.frame;     tempframe.origin.y -= manimationoffset;     mbackgroundimageview.frame=tempframe;     [uiview commitanimations]; } 

rather creating animation each view, try having 1 animation block animates multiple views, example in common superview. i'm not sure make enough improvement 25 views case.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -