简体   繁体   English

UIWebView第一次在iOS 9中不起作用

[英]UIWebView not working first time in iOS 9

I have a UIWebView , whose delegate is set in viewDidLoad and then a URL is passed to it. 我有一个UIWebView ,其委托在viewDidLoad设置,然后将URL传递给它。 This screen is loaded once the app launches. 应用启动后即会加载此屏幕。 The webview doesn't load the URL and the delegate method (given below) is not called webview不会加载URL,并且不会调用委托方法(如下所示)

-(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType

There is a button on the same screen. 在同一屏幕上有一个button When i press that after app launches. 当我在应用程序启动后按该按钮时。 The same Web view loads. 加载相同的Web视图。

Please tell me why my UIWebview is not loading for the first time? 请告诉我为什么我的UIWebview第一次不加载?

It happens only in iOS 9. In iOS 8, it works perfectly. 它仅在iOS 9中发生。在iOS 8中,它运行完美。

Add below key in you .plist and try. .plist添加以下项,然后尝试。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM