override func viewDidLoad() {
super.viewDidLoad()
let userContentController = WKUserContentController()
userContentController.add(self, name: "doMessage")
let webviewConfiguration = WKWebViewConfiguration()
webviewConfiguration.userContentController = userContentController
webview = WKWebView(frame: self.view.frame, configuration: webviewConfiguration)
view.addSubview(webview!)
webview?.uiDelegate=self; //разрешаем подмену алертов
webview?.navigationDelegate = self
webview?.allowsBackForwardNavigationGestures=false;
webview?.isOpaque=false;
webview?.backgroundColor=UIColor.clear;
webview?.scrollView.backgroundColor=UIColor.clear;
webview?.load(URLRequest(url: URL(string:"https://увувцувцу")!));
let jeremyGif = UIImage.gifImageWithName("images/anim")
let imageView = UIImageView(image: jeremyGif)
imageView.frame =
CGRect(x: (self.view.frame.size.width-267)/2, y: (self.view.frame.size.height-300)/2,
width: 267,
height: 300)
imageView.tag=100;
view.addSubview(imageView);