Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

某个url加载不显示问题 #7

Open
Chosting163 opened this issue Mar 8, 2018 · 2 comments
Open

某个url加载不显示问题 #7

Chosting163 opened this issue Mar 8, 2018 · 2 comments

Comments

@Chosting163
Copy link

大神你好,我用UIWebView练习写的简易浏览器一般网站都能正常打开,唯独有一个url(地址不便粘上望理解)加载完成也没报错,可一直是白屏,在电脑上和手机上用浏览器却可以打开,于是找到了您写的这款浏览器跑起来执行竟然也可以访问,小白希望您能提供一点解决思路,不胜感谢~

@zhongwuzw
Copy link
Owner

你好,没有urldebug的话很难判断问题,我提供一下思路吧:

  1. 先看一下UIWebViewDelegate的几个委托方法的回调情况,比如request正常发出、没有出现fail,且调用了finishLoad方法.
  2. 如果如上都正常,那就Debug一下UI层级吧,或者LLDB po 一下webView.subviews看一下有是不是确实没有子视图。

@zhongwuzw
Copy link
Owner

@Chosting163 ,网站引入的js未处理异常,没拿到User-Agent,导致js解释报错,从而界面未渲染。解决方法,请求时或者全局加一个User-Agent

qq20180309-175729 2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants