Hide header with google groups inside UIWebView

277 views Asked by At

I'm displaying google groups view inside my UIWebView window but it displays the header with options to other google services. Is there a way to hide the header and just display the google groups content ?

This is the URL I'm using ...

https://groups.google.com/d/forum/MyAppGroupName

enter image description here

1

There are 1 answers

0
Victor Do On BEST ANSWER

Use UIWebViewDelegate method webViewDidFinishLoad and run this JS script in

- (void)webViewDidFinishLoad:(UIWebView *)webView {
NSString *script = [NSString stringWithFormat:@"document.getElementById(\"og_head\").style.display='none';"];
[webView stringByEvaluatingJavaScriptFromString:script];
}