iPhone:如何从左到右做一个presentModalViewController动画 [英] iPhone: How to do a presentModalViewController animation from left to right

查看:18
本文介绍了iPhone:如何从左到右做一个presentModalViewController动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在展示一个带有动画的模型视图.默认情况下,它是从下到上的.如何使动画从左到右?我知道我可以使用导航控制器.但实际上呈现视图不需要导航栏,模态呈现视图也不需要导航栏.我仍然想要从左到右的过渡.

I am presenting a model view with animation. As a default it comes from bottom to top. How can I make the animation to go from left to right? I know I could use a navigation controller. But actually the presenting view does not need a navigation bar and also the modally presented view does not need a navigation bar. Still I want a transition from left to right.

推荐答案

UIModalTransitionStyle只有四个:

UIModalTransitionStyleCoverVertical
UIModalTransitionStyleFlipHorizontal
UIModalTransitionStyleCrossDissolve
UIModalTransitionStylePartialCurl

就像你说的,导航控制器会朝那个方向推进.如果您不想使用它,则必须自己为视图设置动画.

Like you said, a nav controller will push that way. If you don't want to use that, you'll have to animate the view yourself.

这篇关于iPhone:如何从左到右做一个presentModalViewController动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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