简体   繁体   中英

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];        
}
[UIView setAnimationCurve: UIViewAnimationCurveLinear];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM