0

我正在uiviews使用两个动画CGAffineTransform

对于第一个视图:

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];  

这里有两个在开始views击中animation,我必须做的是不允许在这些之间击中uiviews

4

0 回答 0