Showing hidden view really slow

后端 未结 3 952
情书的邮戳
情书的邮戳 2021-01-14 17:15

I have a setup as such:

self.webView = WKWebView(frame: frame, configuration: WKWebViewConfiguration())
self.externView = UIView(frame: frame)
self.externWeb         


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-01-14 17:56

    Run the hide/show code on the UI thread

     dispatch_async(dispatch_get_main_queue()) {
            WKExteralLoader.webView!.hidden = false;
            WKExteralLoader.externView!.hidden = true;
        }
    

提交回复
热议问题