transitionFromView 做了正确的事情,但没有动画。为什么?

发布于 2024-10-09 01:30:29 字数 320 浏览 0 评论 0原文

代码如下:

[UIView transitionFromView:mapView toView:tableView duration:5.0 options:UIViewAnimationOptionShowHideTransitionViews|UIViewAnimationTransitionFlipFromLeft completion:NULL];

调用此方法后,mapView 被隐藏,tableView 可见,但没有动画!我将持续时间更改为 5 秒,以确保我不会错过动画,但它确实不是动画。上面的行有什么问题吗?还是我需要做一些事情来激活动画?

Here's the code:

[UIView transitionFromView:mapView toView:tableView duration:5.0 options:UIViewAnimationOptionShowHideTransitionViews|UIViewAnimationTransitionFlipFromLeft completion:NULL];

After calling this method the mapView is hidden and the tableView is visible, but there is no animation! I changed the duration to 5 seconds to make sure that I wouldn't miss the animation, but it really isn't animating. Is there anything wrong with the above line or do I need to do something to activate the animation?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖微凉心微凉 2024-10-16 01:30:29

您似乎使用了错误的动画选项。你需要使用。

UIViewAnimationOptionTransitionFlipFromLeft

目前您正在使用

UIViewAnimationTransitionFlipFromLeft

It looks like you're using the wrong animation option. You need to be using.

UIViewAnimationOptionTransitionFlipFromLeft

Currently you're using

UIViewAnimationTransitionFlipFromLeft
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文