Webview with some problems in Swift

Asked

Viewed 190 times

0

I got a problem

Simple code:

let url = "http://apple.com"


override func viewDidLoad() {
super.viewDidLoad()

let requestURL = NSURL(string:url)
let request = NSURLRequest(URL: requestURL!)
webView.loadRequest(request)
}

this webview is not loading the responsive site, loads normal with a horrible zoom, someone knows why?

  • I tested this same code and worked on all versions in the simulator. It was responsive and not black. Maybe the problem is in the interface (I used storyboard) or any other environment configuration. More details can be provided?

  • now ran on all emulators, but the problem of responsive continues, it loads with horrible zooom, and does not appear the menu of options (q responsive sites should appear), when add the buttons, update, previous and next in webview, works normally. if I remove them, it’s not responsive.

  • if you can help me

  • Because then, I never came across it, so I asked about more details than this code only. If you want, download the example I made simply with a web view, opening the responsive website anyway.

1 answer

0


Make sure that your UIWebView has the size needed to display the content. A suggestion is to create NSLayoutConstraints to work on all devices.

  • was that I wasn’t showing everything was worth

Browser other questions tagged

You are not signed in. Login or sign up in order to post.