ios - How to know WebView has been already load url in Swift? -
how know did webview
had load url inside ?
my way (using delegate
) :
var loadstates=false func loadpage() { if loadstates==false { let url = nsurl (string: "https://www.google.com/"); let requestobj = nsurlrequest(url: url!); webview.loadrequest(requestobj); } } func webviewdidfinishload(webview: uiwebview) { hideactivityindicator(webview) loadstates=true }
have better way ? wevview.isempty()==true
syntax in swift way?
Comments
Post a Comment