Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用该UIView方法animateWithDuration:animations为滑动 a 设置动画UIView。它看起来有点波涛汹涌。有没有更好的方法,比如 CoreGraphics,来完成更流畅的动画?
UIView
animateWithDuration:animations
你可以尝试使用不同的UIViewAnimationOptions
UIViewAnimationOptions
默认为UIViewAnimationOptionCurveEaseInOut,但您可以尝试其他:
UIViewAnimationOptionCurveEaseInOut
[UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionCurveEaseOut animations:^{ v.center = CGPointMake(400, 400); } completion:^(BOOL finished) { } ];