View Full Version : UIWebView autorotate

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.


Feb 19, 2009, 08:34 PM
The view now rotates but it is like looking at a portrait view in a landscape mode. I cannot get the webview or toolbar to stretch to the sides. I have tried setting this up in IB. Is there anything else I need to do?

Which properties in IB need to be set?


Feb 20, 2009, 09:11 AM
Which properties in IB need to be set
Probably the Autosizing ones in the Size Inspector.

Feb 20, 2009, 05:24 PM
Dont Work :(

Feb 20, 2009, 07:51 PM
Dont Work :(
How did you manage to get it rotating?