Iphone 多个UIView动画
我正在使用Iphone 多个UIView动画,iphone,objective-c,ios,Iphone,Objective C,Ios,我正在使用cGrafineTransform 对于第一视图: swingView.transform = CGAffineTransformRotate(swingView.transform, M_PI/2); [UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionRepeat|UIViewAnimationOptionA
cGrafineTransform
对于第一视图:
swingView.transform = CGAffineTransformRotate(swingView.transform, M_PI/2);
[UIView animateWithDuration:1.0
delay:0.0
options:UIViewAnimationOptionRepeat|UIViewAnimationOptionAutoreverse
animations:^{
swingView.transform = CGAffineTransformMakeRotation(M_PI);
}
completion:^(BOOL finished){
NSLog(@"Done!");
}];
第二种观点
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:2.0];
[UIView setAnimationCurve:UIViewAnimationCurveLinear];
[UIView setAnimationBeginsFromCurrentState:YES];
CGAffineTransform transform = CGAffineTransformMakeTranslation(touchLocation.x, touchLocation.y);
CGAffineTransform transform1 = CGAffineTransformMakeTranslation(-120, 0);
myview.transform = transform1;
[UIView commitAnimations];
这里有两个
视图
正在命中当动画
开始时,我必须做的是不允许在这些ui视图
之间命中 你是用同样的方法调用它吗?不是。。一个在viewdidload中,另一个在other method中..您想要的是,为第一个视图设置动画,当它完成时,启动第二个视图?(对不起,我的坏消息)