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.
我正在尝试使用 CAAnimation 在我的应用程序中切换视图控制器。当我在这两个特定的视图控制器之间切换时,我不想要任何动画。这可能吗?如果是这样,我将如何实现这一目标?
谢谢!
如何将持续时间设置为 0:
BOOL shouldAnimate = // here you set your condition whether to animate or not CFTimeInterval standartDuration = 1.0; CAAnimation *animation = [CAAnimation animation]; animation.duration = shouldAnimate ? standartDuration : 0.0;