如何在没有动画的情况下进行放松搜索? [英] How to perform unwind segue without animation?

查看:136
本文介绍了如何在没有动画的情况下进行放松搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在不使用任何动画的情况下进行放松搜索.我尝试设置一个放松的场景,并在右侧的情节提要中取消选中动画",但它仍然是动画的(它会向下滑动),我该如何解决?

How do i perform unwind segue without any animation. I tried setting up a unwind segue and in the storyboard on the right side unchecking "Animates" but its still animated(it slides down), how can i fix that?

推荐答案

使用在iOS模拟器上运行的Xcode 7,可以按预期工作.只需在Attributes Inspector中的Interface Builder中取消选中展开动画上的"Animates",就会使模态显示的视图控制器立即消失,而不是在屏幕外进行动画处理.

Using Xcode 7, running on an iOS Simulator, this works as expected. Simply unchecking "Animates" on the unwind segue in Interface Builder in the Attributes Inspector will cause the modally presented view controller(s) to instantly disappear instead of animate down off screen.

请注意,此行为是iOS 9中的新增功能.对于iOS 8,它仍将为解散动画设置动画.感谢Dave G注意到这一点.

Do note that this behavior is new in iOS 9. For iOS 8, it will still animate the unwind dismissal. Thanks to Dave G for noting this.

我已经附上了一个示例项目,演示了它是如何工作的,您可以将其与您的项目进行比较以确定差异所在.

I've attached a sample project that demonstrates how this is working, which you can compare to your project to determine where the difference lies.

示例项目

这篇关于如何在没有动画的情况下进行放松搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆