Xcode 4 横向方向变灰
我正在尝试在 xcode 4 中创建一个仅支持横向视图的 ipad 应用程序。默认情况下,MainWindow.xib 文件以纵向模式显示界面。我无法将其更改为横向模式,因为该选项呈灰色。
如果我创建一个 UIViewController 子类,我就能够将该新视图旋转为横向。只是不是原来的 MainWindow.xib 视图控制器。
我能够解决此问题的方法是创建第二个视图控制器并将其设置为横向,因为该选项在此视图控制器上没有灰显。然后,我在第一个视图控制器上创建一个按钮,切换到第二个视图控制器,我在其中放置所有对象。
必须有一种更简单的方法来让主视图控制器“MainWindow.xib”在界面生成器中显示为 Landscape。我就是想不通。我真的有第二个视图可以在景观 xib 上创建对象吗?如果是这样,我怎样才能让第二个视图成为主视图,这样我就不需要一个按钮来切换到它?
我对 Xcode 和 IOS 开发完全陌生,所以请原谅我的新手。
I'm trying to create an ipad app in xcode 4 that supports ONLY landscape view. By default the MainWindow.xib file displays the interface in Portrait mode. I cannot change it to landscape mode because the option is grayed out.
If I create a UIViewController subclass, I'm able to rotate that new view to landscape. Just not the original MainWindow.xib viewcontroller.
The way I've been able to work around this, is to create a second view controller and set that to landscape as the option is not grayed out on this one. Then I create a button on the first view controller that switches to the second one where I place all my objects.
There has to be an easier way to have the main viewcontroller "MainWindow.xib" appear in the interface builder as Landscape. I just can't figure it out. Do I really a second view to have a landscape xib to create objects on? If so, how can I have that second view be the main view so that I don't need a button to switch to it?
I'm totally new to Xcode and IOS development, so please forgive my noobness.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论