Buntylm
Buntylm

Reputation: 7373

iOS 6 Autorotation for Only SingleViewController in Multiple ViewController App

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.

Upvotes: 3

Views: 175

Answers (1)

HDdeveloper
HDdeveloper

Reputation: 4404

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.

Upvotes: 2

Related Questions