[英]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.