始终在ipad的视图中以纵向模式打开视图吗? [英] Always open a view in portrait mode in view in ipad?

查看:116
本文介绍了始终在ipad的视图中以纵向模式打开视图吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从一个视图导航到另一个视图时,我只想以纵向视图打开该视图.即,我正在从第一个视图(横向)导航到第二个视图.我希望第二个视图始终以纵向视图打开.在我以横向启动的情况下,该视图为纵向,但设备处于横向模式.我期望的输出是如果我以纵向打开视图并将其旋转为横向而不旋转.

When I navigate from one view to another view, I want to open the view in portrait view only.ie I am navigating from a first view (landscape) to second view. I want the second view to always be open in portrait view.In my case when I launch in landscape, the view is in portrait but the device is in landscape mode. The output I expected was if I open the view in portrait and and on rotating it to landscape with no rotation.

如果您以纵向打开应用程序,并且将auto-rotate设置为NO,那么将设​​备旋转为横向,则输出将不会旋转.我希望在最初以横向加载视图时具有相同的效果

If you open the app in portrait and if you given auto-rotate as NO.Then if you rotate the device to landscape,then there will be no rotation in output.I want the same effect when loading a view initially in landscape.

推荐答案

我很确定您不能再使用setOrientation,因为它已被弃用,并且应用已被拒绝.

I'm pretty sure you cannot use setOrientation anymore, since it is deprecated and apps have been declined for using it.

这可能是您的选择:

http://www.iphonedevsdk.com/Forum/iphone-sdk-development/33548-alternative-setorientation.html

它使用变换来旋转视图.

It rotates the view using a transformation.

这篇关于始终在ipad的视图中以纵向模式打开视图吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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