删除UIView动画加速

Joh*_*ato 1 uiview uiviewanimation ios

如何删除UIView动画的加速和减速动画?

如果你不明白我的意思,当动画启动它会加速,然后当它到达结束时,它会减速.我希望动画是一个恒定的速度.这是我的代码看起来像的一个例子(我必须使用旧的动画方式).

-(void)animate:(NSString*)animationID finished:(BOOL)finished context:(void*)context {         
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationBeginsFromCurrentState:YES];
    [UIView setAnimationDidStopSelector:@selector(animateStop:finished:context:)];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDuration:3];
    Motion.center = (*PathPoints)[Location];
    [UIView commitAnimations];        
}
Run Code Online (Sandbox Code Playgroud)

Ash*_*lls 6

[UIView setAnimationCurve: UIViewAnimationCurveLinear];
Run Code Online (Sandbox Code Playgroud)