且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在iOS6中,UINavigation视图和UITabbar视图的颠倒方向不起作用?

更新时间:2023-01-04 17:08:32

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.

谢谢。