Reputation: 1795
How can I set which orientations my single view should do? This one below works giving me all the orientations, but in specific view, I dont want to rotate.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
Thanks!
Upvotes: 1
Views: 215
Reputation: 1783
Just do this:
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
//Or UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Upvotes: 1