Web view on swift
At work, I was given the task to write an application for iOS, which will only have a web-view, which will open the desired site. I am using x-code version 8.0 of the swift language. I write the following code
class ViewController: UIViewController {
@IBOutlet weak var brouser: UIWebView!
let defaultURL = "https://yandex.ru"
override func viewDidLoad() {
super.viewDidLoad()
self.brouser.loadRequest(NSURLRequest(url: NSURL(string: defaultURL)! as URL) as URLRequest)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}}
A white application window appears on the emulator and nothing else happens. Please tell me how to fix this
1
1 answers
1
Author: VAndrJ, 2016-10-04 11:10:10