Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

XcodeNewb

macrumors member
Original poster
Feb 6, 2009
79
0
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:

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
 

XcodeNewb

macrumors member
Original poster
Feb 6, 2009
79
0
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?

Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.