Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CGRect oldFrame = webView.frame;
- CGFloat contentHeight = [[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.body.offsetHeight;"]] floatValue];
- CGFloat contentWidth = [[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.body.scrollWidth;"]] floatValue];
- [webView setFrame:CGRectMake(0, 0, contentWidth, contentHeight)];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement