开发者

iOS Simultaneous Animations

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜