I\'m coding an iPhone app in which I have a UIWebView
that loads a website with a responsive design.
The problem I have is when I rotate the devices to
Try setting constraints on the UIWebView. When the View rotated, the space constraints should automatically adjust.
In the storyboard, look for the menu icons in the lower right. Select the auto layout icon (looks like a tie fighter), and then select either 'Add Missing Constraints' or 'Reset to Suggested Constraints'.
finally, this solved my problem
- (void)willAnimateRotationToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[self.myWebView setFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
}