XcodeNewb
Feb 19, 2009, 08:15 PM
I am trying to rotate a uiwebview to landscape mode. I have a toolbar at the top of the screen and a uiwebview on the rest of the screen. I added this code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeRight));
}
but the view will not rotate. I am sure I am missing something but cannot figure it out. Do I have to set the webview and toolbar up in IB to autorotate?
Any help is appreciated.
Thanks
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return ((interfaceOrientation == UIInterfaceOrientationPortrait) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeRight));
}
but the view will not rotate. I am sure I am missing something but cannot figure it out. Do I have to set the webview and toolbar up in IB to autorotate?
Any help is appreciated.
Thanks
