I have 2 images in my view. On a click of a button, I'd like to move them both lower on the screen at the same time. Do I need to create 2 thread to have this to run simultaneously or there is a simple way to generate multiple animations to start at the same time.
Any link to a tutorial or documentation would be fine, I can probabl开发者_如何学Goy figure it out then (I've tried to search on google but haven't found yet what I'm looking for).
- (IBAction)moveLowerOnClick{
[UIView beginAnimations:nil context:NULL];
self.somethingToMove.frame = CGRectOffset(self.somethingToMove.frame, 0, 50);
self.anotherThingToMove.frame = CGRectOffset(self.anotherThingToMove.frame, 0, 50);
[UIView commitAnimations];
}
but here: iPhone UIView Animation Best Practice is some discussion about alternates
精彩评论