mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-23 08:09:41 +01:00
Fix removal of tap zones when removing old web views
This commit is contained in:
parent
3b2fcb74fd
commit
4075da2ee8
@ -300,8 +300,10 @@ extension WebViewController: UIContextMenuInteractionDelegate {
|
|||||||
extension WebViewController: WKNavigationDelegate {
|
extension WebViewController: WKNavigationDelegate {
|
||||||
|
|
||||||
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
|
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
|
||||||
while view.subviews.count > 1 {
|
for (index, view) in view.subviews.enumerated() {
|
||||||
view.subviews.last?.removeFromSuperview()
|
if index != 0, let oldWebView = view as? PreloadedWebView {
|
||||||
|
oldWebView.removeFromSuperview()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user