UIView animateWithDuration: duration: animations: completion: seems to have a default transition?

前端 未结 2 779
说谎
说谎 2021-02-19 07:53

In my program, I want to create an animation that will move at a constant speed. It appears that the animation starts slowly, speeds up and then finishes slowly. Is there any wa

2条回答
  •  野性不改
    2021-02-19 08:48

    You should use, that will solve your problem

    [UIView animateWithDuration:duration delay:0 options:UIViewAnimationOptionCurveLinear  animations:^{
            //code with animation
        } completion:^(BOOL finished) {
            //code for completion
        }];
    

提交回复
热议问题