Skip to content

Commit

Permalink
Made changes to the how VisitableView handles its subviews to fix nav…
Browse files Browse the repository at this point in the history
… & tab bars

This is based on hotwired#37
  • Loading branch information
michaelgroves committed Dec 5, 2024
1 parent 08bdabe commit 396fef8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Turbo/Visitable/VisitableView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ open class VisitableView: UIView {
open func activateWebView(_ webView: WKWebView, forVisitable visitable: Visitable) {
self.webView = webView
self.visitable = visitable
addSubview(webView)
insertSubview(webView, belowSubview: activityIndicatorView)
addFillConstraints(for: webView)
installRefreshControl()
showOrHideWebView()
Expand Down Expand Up @@ -155,7 +155,11 @@ open class VisitableView: UIView {
open func showScreenshot() {
guard !isShowingScreenshot, !isRefreshing else { return }

addSubview(screenshotContainerView)
if let webView {
insertSubview(screenshotContainerView, aboveSubview: webView)
} else {
addSubview(screenshotContainerView)
}
addFillConstraints(for: screenshotContainerView)
showOrHideWebView()
}
Expand Down

0 comments on commit 396fef8

Please sign in to comment.