在多视图控制器应用程序中,ios6只适用于SingleViewController

时间:2022-06-23 11:02:34

Is there any way to provide Autorotation to a SingleViewController as in our iPhone App have multiple ViewControllers and need to do autorotate for only One.

有没有办法为一个SingleViewController提供自动切换功能比如我们的iPhone应用有多个viewcontroller只须为一个viewcontrollerautorotate。

1 个解决方案

#1


2  

Yes you can use for your VC(not rotating)

是的,你可以用你的VC(不旋转)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

    {
        //return (interfaceOrientation == UIInterfaceOrientationPortrait);
        return NO;
    }
// New Autorotation support for iOS 6.
- (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0);
{
     Return NO;
    }

Also see Apple Doc It will be helpful.

还可以看看苹果的文档,这将会很有帮助。

#1


2  

Yes you can use for your VC(not rotating)

是的,你可以用你的VC(不旋转)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

    {
        //return (interfaceOrientation == UIInterfaceOrientationPortrait);
        return NO;
    }
// New Autorotation support for iOS 6.
- (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0);
{
     Return NO;
    }

Also see Apple Doc It will be helpful.

还可以看看苹果的文档,这将会很有帮助。