iPad接口方向问题
目前我在模拟器上测试我的应用程序。 我有一个 appDelegate,在这个委托中我有几个我想使用的控制器。 我显示的第一个视图是显示应用程序正在加载的视图。 当它加载时我想显示另一个视图。为了显示这个新视图,我使用了动画,但效果不佳。事实上,在动画期间,新视图以纵向模式显示,当动画完成时,它会转为横向模式。 尽管如此,在我的 info.plist 中,我仅允许横向,并且在我的所有 .xib 文件中,我的所有视图都处于横向模式。
所以我不明白为什么这个动画继续以纵向模式显示我的视图。
有人对这个问题有想法吗? 谢谢
For the moment I test my application on the simulator.
I have an appDelegate and in this delegate I have several controllers that I want to use.
The First one, that I display, is a view which show that the application is loading.
And when it's loaded I want to display another view. To display this new view I use an animation but it doesn't work well. In fact during the animation the new view is display in a portrait mode and when the animation finishes it move to a landscape mode.
Nevertheless in my info.plist I allow landscape only and in all my .xib file all of my view are in landscape mode.
So I don't understand why this animation keep on displaying my view in a portrait mode.
Have Someone an idea about this problem?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能太早尝试显示动画。您不应该从应用程序委托来驱动此过程。您的初始界面应通过提供根视图的 UIViewController 加载。当 UIViewController 第一次获取 didRotateFromInterfaceOrientation: 时,界面已完成加载并旋转到横向模式,您就可以开始摇滚了。
You're probably trying to show the animation too early. You shouldn't be driving this process from the app delegate. Your initial interface should load by way of a UIViewController that provides the root view. When that UIViewController gets didRotateFromInterfaceOrientation: for the first time, the interface has finished loading and rotating into landscape mode and you're ready to rock and roll.