Reputation: 111
How I can make the iOS WebView Element FullScreen? (iPhone Retina (4-inch)
Thank you.
Greetz, Roland!
Upvotes: 1
Views: 1505
Reputation: 2824
You should obviously use Constraints:
Upvotes: 0
Reputation: 965
Here is the easiest way to get that fullscreen, basically you just do a zoom out on the content in the scrollView. I have done so many ways to fix that, but this is the legit one. change the value 0.5 into any number you want and that value is supposed to be < 1 because you zoom it out the content.
- (void)viewDidLoad
{
webView.scalesPageToFit = YES;
}
-(void)webViewDidFinishLoad:(UIWebView *)webView
{
webView.scrollView.zoomScale = 0.5;
}
Upvotes: 1