0
votes

I am using UIWebView to display the PDF and Word documents on iPhone. I want them to auto rotate when device orientation changes. For that I have added following delegate method. Something weird is happening though. It works fine when I have I have only one tab which has UIWebView. It loads document fine and also rotate perfectly but when I add another tab, it doesn't rotate..! While debugging I could see that when I have two table, it receives the rotation event only for UIDeviceOrientationLandscapeRight and UIDeviceOrientationLandscapeLeft. Could any one please help me to get rid of this.

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES;

}

Thanks.

1

1 Answers

0
votes

Assuming you're using a tab bar controller for the tabs, you need to make sure that the views on all tabs support the different device orientations. Try implementing the methods in the tab bar controller class.