在没有动画的情况下在 xcode 中推送 segue [英] Push segue in xcode with no animation
本文介绍了在没有动画的情况下在 xcode 中推送 segue的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在 xcode 中使用普通的故事板和推送转场,但我希望转场只出现在下一个视图,而不是滑动下一个视图(就像当您使用选项卡栏并且下一个视图刚出现时一样).
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屋!
查看全文