如何改变后退按钮弹出视图控制器动画? [英] How to change pop view controller animation on back button?

查看:159
本文介绍了如何改变后退按钮弹出视图控制器动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我推我的视图控制器用下面的语句:

I am pushing my view controller with the following statement :

[[self navigationController] pushViewController:self.customViewController animatedWithTransition:UIViewAnimationTransitionFlipFromLeft];

现在,当我pressing后退按钮我想用uiviewanimationtransitionflipfromright动画吧。

Now when I am pressing the back button I want to animate it with the uiviewanimationtransitionflipfromright .

[self.navigationController popViewControllerAnimatedWithTransition:UIViewAnimationTransitionFlipFromLeft];

我怎么可以这样做?

How Can I do so ?

感谢

推荐答案

这可以帮助你在动画后退按钮视图。

This helps you to animating the view in back button.

[UIView  beginAnimations:nil context:NULL];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration:0.75];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.navigationController.view cache:NO];
[UIView commitAnimations];

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDelay:0.375];
[self.navigationController popViewControllerAnimated:NO];
[UIView commitAnimations];

这篇关于如何改变后退按钮弹出视图控制器动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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