gpt4 book ai didi

ios - 在 UIWebView 中隐藏带有 google groups 的标题

转载 作者:行者123 更新时间:2023-11-29 00:31:58 25 4
gpt4 key购买 nike

我在我的 UIWebView 窗口中显示谷歌组 View ,但它显示带有其他谷歌服务选项的标题。有没有办法隐藏标题并只显示 google groups 内容?

这是我正在使用的 URL ...

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

enter image description here

最佳答案

使用 UIWebViewDelegate 方法 webViewDidFinishLoad 并运行此 JS 脚本

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

关于ios - 在 UIWebView 中隐藏带有 google groups 的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41526055/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com