Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 6 Autorotation for Only SingleViewController in Multiple ViewController App

Tags:

xcode

iphone

ios6

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.

like image 787
Buntylm Avatar asked Jun 20 '26 07:06

Buntylm


1 Answers

Yes you can use for your VC(not rotating)

- (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.

like image 133
HDdeveloper Avatar answered Jun 22 '26 23:06

HDdeveloper



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!