我想让我的动画带有弓形而不是直线。
这是我的代码:
UIImageView *logoImageView = [[UIImageView alloc] initWithFrame:CGRectMake(-125, 100, 125, 125)];
logoImageView.image = logoImage;
logoImageView.contentMode = UIViewContentModeScaleAspectFit;
[self.view addSubview:logoImageView];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:3.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
logoImageView.frame = CGRectMake(screenRect.size.width - 192, 190, logoImageView.frame.size.width, logoImageView.frame.size.height);
[UIView commitAnimations];
我也试过这个,但它不起作用(它只需要最后一个中心移动)。
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:3.0];
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
logoImageView.center = CGPointMake ...
logoImageView.center = CGPointMake ...
logoImageView.center = CGPointMake ...
等等
logoImageView.frame = CGRectMake(screenRect.size.width - 192, 190, logoImageView.frame.size.width, logoImageView.frame.size.height);
[UIView commitAnimations];
我怎样才能做到这一点?
先感谢您。