Lucas Veiga
Lucas Veiga

Reputation: 1795

shouldAutorotateToInterfaceOrientation Single View

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

Answers (1)

Selkie
Selkie

Reputation: 1783

Just do this:

- (BOOL)shouldAutorotateToInterfaceOrientation:   (UIInterfaceOrientation)interfaceOrientation
{
     //Or UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight
     return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

Upvotes: 1

Related Questions