John Riselvato
John Riselvato

Reputation: 12904

removing UIView Animation acceleration

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

Upvotes: 1

Views: 1686

Answers (1)

Ashley Mills
Ashley Mills

Reputation: 53102

[UIView setAnimationCurve: UIViewAnimationCurveLinear];

Upvotes: 6

Related Questions