Hide content on a UIWebView

时光怂恿深爱的人放手 提交于 2019-12-12 03:17:05

问题


I'm working on an application for iOS in Xcode, i want to hide some content of my page and keep only the center of it. E.g : http://imageshack.com/a/img661/8407/X5KuuN.png. If it's too complicate to hide contents, it would be enough to force the page to be at the center, in the middle of the page (user can't move the page and the page will load in the center).

Thanks for help.


回答1:


You can remove/modify the unwanted DOM elements by "injecting" javascript at webViewDidFinishLoad stage with [yourWebView stringByEvaluatingJavaScriptFromString: yourJSCodeString] function.



来源:https://stackoverflow.com/questions/28306851/hide-content-on-a-uiwebview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!