views:

57

answers:

2

Hello,

I have a UIWebView which loads a url. In MobileSafari this webpage will adjust when the handset is rotated to the landscape position. In my UiWebView it just stays in portrait - is the a property I need to add to allow this to occur?

Cheers!

+2  A: 

You need to set your shouldAutoRotateToInterfaceRotation: method to respond to the rotations needed. I have tested this and it works perfectly.

Richard J. Ross III
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation{ return YES;}This does not appear to do the trick? Any ideas?
AveragePro
It works for me in the iPhone simulator, if it doesn't work with the device, then i don't know what is going on..do you have the autosize properties set right? (e.g. flexible width/height)
Richard J. Ross III
Is it to do with it being a Tab Bar application? All the properties appear to be correct.
AveragePro
+1  A: 

Is your top level UIViewController handling rotations (allowing them in the shouldAutorotate delegate) for its view (and thus for all subviews, including your web view)?

hotpaw2