iphone - 如何更改后退按钮上的弹出 View Controller 动画?

标签 iphone animation uinavigationcontroller

我正在使用以下语句推送我的 View Controller :

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

现在,当我按下后退按钮时,我想使用 uiviewanimationtransitionflipfromright 为其设置动画。

喜欢

[self.navigationController popViewControllerAnimatedWithTransition:UIViewAnimationTransitionFlipFromLeft];

我该怎么做?

谢谢

最佳答案

这可以帮助您为后退按钮中的 View 设置动画。

[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];

关于iphone - 如何更改后退按钮上的弹出 View Controller 动画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2942221/

相关文章:

iphone - UIView 隐藏属性...还有更多吗?

iphone - uitableviewcell 的数据在滚动时相互重叠

objective-c - NSImageCell旋转动画

iPhone iOS 使用 UIView animateWithDuration block 执行操作的正确方法是什么?

ios - 使用 UINavigationController 推送两个 View 后后退按钮消失

iphone - 如何确定一组特定实验值的比例因子

android - 文本输入的 HTML 5 模式验证不适用于带有 iphone 的 safari 或 firefox

javascript - 我可以用 React Native 组件做轮播吗?

ios - UIToolBar 结合 pushViewController

ios - 登录成功后自定义segue