Reputation: 7373
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
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