在没有动画的xcode中推送segue [英] Push segue in xcode with no animation

查看:71
本文介绍了在没有动画的xcode中推送segue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用普通的故事板,并在xcode中推送segues,但是我想让segues仅出现在下一个视图中,而不是滑动下一个视图(例如当您使用选项卡栏而下一个视图只是出现时)。 / p>

是否存在一种简单的方法来使普通的推送脚本仅显示而不是滑动,而无需添加自定义脚本?



一切正常,我只想删除视图之间的幻灯片动画。

解决方案

现在,我已经使用以下代码成功做到了这一点:

  CreditsViewController * creditspage = [self.storyboard InstantiateViewControllerWithIdentifier:@ Credits ]; 
[UIView beginAnimations:@翻转视图上下文:无];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:YES];
[self.navigationController pushViewController:creditspage动画:否];
[UIView commitAnimations];

希望这对其他人有帮助!


I am using normal storyboarding and push segues in xcode, but I want to have segues that just appear the next view, not slide the next view (as in when you use a tab bar and the next view just appears).

Is there a nice simple way to have normal push segues just "appear" and not "slide", without needing to add custom segues?

Everything is working completely fine, I just want to remove that slide animation between the views.

解决方案

I have now managed to do this using the following code:

CreditsViewController *creditspage = [self.storyboard instantiateViewControllerWithIdentifier:@"Credits"];
[UIView beginAnimations:@"flipping view" context:nil];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:YES];
[self.navigationController pushViewController:creditspage animated:NO];
[UIView commitAnimations];

Hope this helps someone else!

这篇关于在没有动画的xcode中推送segue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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