To animate multiple objects in a view, do we have to use seperate timers for each of the object?
Currently I have four objects for which I am using four timers. How can I do it using a single timer?
Thanks!
To animate multiple objects in a view, do we have to use seperate timers for each of the object?
Currently I have four objects for which I am using four timers. How can I do it using a single timer?
Thanks!
If you are animating at the same time then you should use four timers,else you can use single timer itself.
All the best.
If you are animating them all at once within the same time window you can do them together:
[UIView beginAnimations:@"anim1" context:nil];
[UIView setAnimationDuration:0.4];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
object1.frame = newFrame1;
object2.frame = newFrame2;
object3.frame = newFrame3;
object4.frame = newFrame4;
[UIView commitAnimations];