方法setAnimationDuration对我的代码没有影响,我的动画太快了.这是代码
[UIView beginAnimations:nil context:nil];
image1.frame=CGRectMake(0, 0, 0,image1.frame.size.height);
image2.frame=CGRectMake(image2.frame.size.width, 0, 0,image2.frame.size.height);
[UIView setAnimationDuration:10];
[UIView setAnimationDelegate:self];
[UIView commitAnimations];
Run Code Online (Sandbox Code Playgroud) objective-c ×1