There is a WebView that should display a page from html code. (Via loadHTMLString). I had to make certain code viewDidLoad I loaded it, so in viewDidLoad I added the line webView.delegate = self , added UIWebViewDelegate controller class UIWebViewDelegate , and added webViewDidFinishLoad and webView(... shouldStartLoadWithRequest request: NSURLRequest, ...) to the class webView(... shouldStartLoadWithRequest request: NSURLRequest, ...) , but, having started the program, I saw that all the CSS had flown somewhere. I removed the line with the delegate , everything returned to its place, but the webViewDidFinishLoad method stopped being called ... I rummaged through the whole Internet, I did not find anything on this topic ... What should I do? Can anyone come across such a problem?
You asked for a delegate code. I decided to provide all the code, I just cut off something that definitely does not affect the problem, and, out of habit, I commented on everything in English =) I hope for your help: http://swiftlang.ng.bluemix.net/#/repl/ 58850ee5b90d0e34734a8f27