I have UIWebView that automatically resizes to the users orientation when they rotate the device with the following code:
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
[self.webView setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
the code works fine if the user rotates while looking at the webView, the problem occurs if the user rotates the device in a different view(previous screen) and then navigates to my webView (screen), my webview becomes cut off. Im not sure how to automatically rotate it based on detected orientation. I tried putting the following code into my viewDidLoad but it doesnt seem to work
[self.webView setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
any suggestions would be greatly appreciated.