如何设置不同视图的方向?
我有一个应用程序委托文件和 5 个其他视图。我已通过导航控制器连接。现在我想设置横向模式的方向。我有一个问题,当我更改视图时,只有滚动视图更改和重读视图以及导航栏和按钮都不会更改其位置。虽然我已经通过 xib 文件设置了它们但不起作用。我有下面的代码,但这也不起作用。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
Return YES;}
那么现在我如何解决我的问题呢?
I have one app delegate file and 5 other view.I have connected by navigation controller. now i want to set orientation for landscape mode. i have problem that when i change view then only scoll view change and reamining view and navigation bar and button all not change their postion. While i have set them by xib file but not working. i have below code but that also not work.
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
Return YES;}
so now how i solve my problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这将帮助你...... http://www.techotopia.com/index.php /iPhone_Rotation,_View_Resizing_and_Layout_Handling
This will help you .... http://www.techotopia.com/index.php/IPhone_Rotation,_View_Resizing_and_Layout_Handling
您需要设置子视图的自动调整大小以及状态栏方向。您将在 stackoverflow 上获得许多指导帖子。
you need to set autoresizing of subviews and as well as statusBar Orientation. You will get many posts on stackoverflow for orientation.