iPad 应用程序的横向和纵向方向
我知道这个问题已经被问过很多次了。我已经搜索过,但没有得到能够很好实施的正确答案。
问:如何处理 iPad 应用程序的横向和纵向方向?
注意:在界面构建器的 Size Inspector 中 ->自动调整大小我们可以设置图像的方向,但是当我们有一个复杂的视图时,如何才能很好地将方向从纵向更改为横向?如果我们需要调用不同的.xib,该怎么做?
谢谢
I know this question has been asked for many times. I've searched but didn't get the proper answer which one will be able to implement nicely.
Question : How can I handle the Landscape and Portrait Orientations for iPad Apps ?
Note : In interface builder's Size Inspector -> Autosizing we can set the orientations for Images but when we have a complex view how can I change the orientation from Portrait to Landscape nicely ? If we need to call different .xib , how to do that ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
UIViewController
参考文档http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
其中包含诸如
didRotate
、< code>willRotate 等,您可以根据您的需要覆盖它们。当视图发生旋转时,您可以通过自动调整大小选项来调整视图的大小。 中了解有关自动调整大小选项的更多信息您可以在
UIView
参考文档http://developer.apple.com/library/ios/#documentation/uikit/reference/UIView_Class/UIView/UIView.html请浏览 UIViewAutoresizing 部分。
You can use the
UIViewController
reference documenthttp://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
These contain methods like
didRotate
,willRotate
etc and u can override them according to your needs. When the rotation of the view occurs u can adjust the view's size through the auto-sizing options. You can know more about auto-resizing options inUIView
reference documenthttp://developer.apple.com/library/ios/#documentation/uikit/reference/UIView_Class/UIView/UIView.html
Pls go through the UIViewAutoresizing part.