0
votes

I have a webview which fills the full screen of the app. The content gets loaded from a web url, and is displayed correctly.

The problem is when I load it in portrait mode and then rotate to landscape, the right side can not receive any touch events. For example, the portrait screen width is 320, when I rotate to landscape which is 480, the right area (width 480-320=160) does not respond to touch. The content is always displayed correctly, it fills the whole width, just the touch events don't work. If I load it in landscape and then rotate to portrait, it works correctly.

1

1 Answers

1
votes

A similar problem was reported on Apple's developer forum here

You should basically add

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
}

to the UIWebView's viewcontroller