杨锴
2024-11-07 62a24b3c7cf92919a93ee575e9460037e1a53816
XQMuse/Root/Other/WebVC.swift
@@ -54,7 +54,7 @@
                        webView?.addObserver(self, forKeyPath: "estimatedProgress", options: .new, context: nil)
                        view.addSubview(webView!)
                        webView?.snp.makeConstraints({ (make) in
                                    make.top.equalToSuperview()
            make.top.equalToSuperview().offset(UIDevice.jq_safeEdges.top)
                                    make.left.right.bottom.equalToSuperview()
                        })
@@ -64,6 +64,7 @@
                                    self.automaticallyAdjustsScrollViewInsets = false
                        }
        webView!.scrollView.delegate = self
                        progressView.tintColor = tintColor
                        view.addSubview(progressView)
@@ -109,3 +110,12 @@
            }
}
extension WebVC:UIScrollViewDelegate{
    func scrollViewDidScroll(_ scrollView: UIScrollView) {
        //                                let v = min(scrollView.contentOffset.y / JQ_NavBarHeight, 1)
        //                                navigationController?.navigationBar.standardAppearance.backgroundColor = .white.withAlphaComponent(v)
        navigationController?.navigationBar.standardAppearance.backgroundColor = .white
        navigationController?.navigationBar.scrollEdgeAppearance?.backgroundColor = .white
    }
}