简体   繁体   中英

UIWebview Returning Blank Screen

After learning the basic framework, what seems to be working for others is consistently returning a blank screen. Below is what I'm led to believe is overkill, but is still not working. I'm attempting to load an IP as the url (if you are on the same network as one of our products and enter its IP address, a browser will load an interface with relevant values & controls. webIP is the IP string passed from a prior screen and is coming in fine (replacing with google URL still didn't work). This block is inside viewDidLoad in a vanilla enter image description here ViewController:

let deviceURL = NSURL(string: "\(webIP)")
    let deviceURLRequest = NSURLRequest(URL: deviceURL!)
    deviceWebView.loadRequest(deviceURLRequest)
    deviceWebView.reload()
    self.reloadInputViews()

I have made sure that there are no UI elements blocking it. Any help is appreciated!!

check whether " App Transport Security Settings " entry is available in plist file? 在此处输入图片说明 If not then add " App Transport Security Settings " into your plist file as shown

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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