在iOS6中,UINavigation视图和UITabbar视图的颠倒方向不起作用? [英] Upside down orientation not working in iOS6 for UINavigation view and UITabbar view?

查看:115
本文介绍了在iOS6中,UINavigation视图和UITabbar视图的颠倒方向不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用导航视图在ios 6中创建了一个应用程序。我也在应用程序摘要中设置了所有方向选项,甚至使用了

I created an app in ios 6 with navigation view.Also I have set all orientation options in the application summary and even used the

 -(BOOL) shouldAutoRotate

-(NSUInteger) supportedInterfaceOrientaion

我视图中的方法controller.when我运行我的应用程序方向工作正常,除了颠倒。我应该怎么做也支持颠倒。

methods in my view controller.when I run my app orientation works fine except upside-down.What should I do to also support upside-down.

当我添加时我也面临同样的问题UITabBar控制器。

I also facing the same problem when I add UITabBar controller.

请分享您的想法。

谢谢

推荐答案

Hai我找到了解决问题的方法

Hai I have found solution for my problem

解决方案:
对于包含UINavigation控制器的应用程序,我只为UINavigation Controller类创建了一个类别,我定义了这些方法

Solution: For the app which consist UINavigation controller, just I created a category for UINavigation Controller class and I defined these methods

-(BOOL) shouldAutorotate{
    return YES;
}

-(NSUInteger) supportedInterfaceOrientations{

    return UIInterfaceOrientationMaskAll;
}

添加此内容后,我的应用程序支持所有方向。

After adding this, all orientation were supported in my app.

同样,我也为UITabBar Controller做了。这对我来说也是通过为UITabBar Controller创建类别来实现的。

The same, I done for UITabBar Controller also.This too worked for me by creating category for UITabBar Controller.

谢谢。

这篇关于在iOS6中,UINavigation视图和UITabbar视图的颠倒方向不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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