I have app , When i rotate clockwise direction of iphone i need to display my Report UIViewcontroller only landscape mode . Other UIViewcontroller is Portrait mode.
OtherUIviewController
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Report Uiviewcontroller
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
But how to check it clock wise direction . Any sample//
You need to check for both
UIInterfaceOrientationLandscapeRightANDUIInterfaceOrientationLandscapeLeft. Otherwise you’ll only have the screen rotated if the home button points to the right-hand side.