add stop loading, although it not loading
This commit is contained in:
parent
95d305254f
commit
4abfeef11a
@ -69,6 +69,7 @@ import WebKit
|
|||||||
if let previousUrl = previousURL, url == previousUrl {
|
if let previousUrl = previousURL, url == previousUrl {
|
||||||
//dont load the new
|
//dont load the new
|
||||||
} else {
|
} else {
|
||||||
|
webView?.stopLoading()
|
||||||
webView?.load(URLRequest(url: url))
|
webView?.load(URLRequest(url: url))
|
||||||
webViewHeight?.constant = 44
|
webViewHeight?.constant = 44
|
||||||
overLayer.isHidden = false
|
overLayer.isHidden = false
|
||||||
@ -78,6 +79,7 @@ import WebKit
|
|||||||
if let previousHTML = previousHtmlString, previousHTML == htmlString {
|
if let previousHTML = previousHtmlString, previousHTML == htmlString {
|
||||||
//dont load the new html since they are the same html string as preivous
|
//dont load the new html since they are the same html string as preivous
|
||||||
} else {
|
} else {
|
||||||
|
webView?.stopLoading()
|
||||||
webViewHeight?.constant = 44
|
webViewHeight?.constant = 44
|
||||||
webView?.loadHTMLString(htmlString, baseURL: nil)
|
webView?.loadHTMLString(htmlString, baseURL: nil)
|
||||||
overLayer.isHidden = false
|
overLayer.isHidden = false
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user