我正在展示一个带有动画的模型视图.默认情况下,它是从下到上的.如何使动画从左到右?我知道我可以使用导航控制器.但实际上呈现视图不需要导航栏,模态呈现视图也不需要导航栏.我仍然想要从左到右的过渡.
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动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!