Pergunta

How does one remove the acceleration and deceleration animation that UIView Animations do?

If you don't understand what I mean, when an animation starts up it accelerates and then when it get to the end, it decelerated. I want the animation to be a constant speed. Here is an example of what my code looks like (I MUST use the old animation ways).

-(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];        
}
Foi útil?

Solução

[UIView setAnimationCurve: UIViewAnimationCurveLinear];
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top