iPhone: How to do a presentModalViewController animation from left to right(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动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:iPhone:如何从左到右做一个presentModalViewController动画
- 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
- GPS状态的广播接收器? 2022-01-01
- 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
- UITextView 内容插图 2022-01-01
- 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
- SetOnItemSelectedListener上的微调程序错误 2022-01-01
- Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
- 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01
- 网上有没有好的 UIScrollView 教程? 2022-01-01
- URL编码Swift iOS 2022-01-01
