简体   繁体   English

如何创建与“垂直覆盖”相反的过渡

[英]How do i create a transition that does the opposite of “Cover vertical”

I am using the storyboard in Xcode to create a prototype of my app. 我正在Xcode中使用情节提要来创建我的应用程序原型。 At one point i have a view that slides up using the segue "cover vertical". 在某一点上,我使用“覆盖垂直”的segue向上滑动。 How can have that view slide back down again if users press cancel on that screen. 如果用户在该屏幕上按“取消”,该视图如何再次向下滑动。

Basically I am looking for a transition that makes me take the user back to the previous screen. 基本上,我正在寻找一种转换方法,使我可以将用户带回到上一个屏幕。 To the below layer that was just covered by the view that slid up from the bottom if you will. 如果您愿意的话,可以从下面向上滑动到下一层。

Cheers 干杯

When you are in the view controller, simply call 当您在视图控制器中时,只需调用

[self dismissViewControllerAnimated:YES completion:nil];

If the view controller transition is cover vertical, it will simply reverse the animation and go back down while uncovering your previous view controller. 如果视图控制器过渡是覆盖垂直的,则它将简单地反转动画并向下滚动,同时发现先前的视图控制器。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 情节提要中封面垂直过渡的对面 - Opposite of Cover Vertical transition in Storyboards 如何为Page View Controller提供“垂直覆盖”过渡样式 - how to give Page View Controller a “Cover Vertical” transition style iPhone 4和5上的Storyboard Segue Cover垂直过渡 - Storyboard segue cover vertical transition on iPhone 4 and 5 如何创建一个 react-native 全屏模式,它将覆盖带有选项卡的 SafeAreaView? - How do I create a react-native full-screen modal that will cover a SafeAreaView with tabs? 自动布局-为什么“垂直间距”有时会附加到视图的相对侧? - Autolayout - Why does “Vertical Spacing” sometimes attach to the opposite side of a view? 如何在 SwiftUI 中创建从登录视图到选项卡视图之间的转换? - How do I create a transition between from Login View to Tab View in SwiftUI? 加载视图时,如何使图像覆盖屏幕? - How do I make an image cover the screen when a view is loading? 如何使封面照片出现在iPhone Safari上 - How do I make the cover photo appear on iPhone Safari 如何在视图转换时停止计时器? - How do I stop timer on view transition? 如何转换/动画UINavigationBar的颜色? - How do I transition/animate color of UINavigationBar?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM