Commit af64ad61 authored by David黄金龙's avatar David黄金龙

测评页 导航栏渐白

parent 7a14cb57
......@@ -122,6 +122,7 @@ private extension YHH5WebViewVC {
webview = DWKWebView(frame: .zero)
webview.scrollView.contentInsetAdjustmentBehavior = .never
webview.navigationDelegate = self
webview.scrollView.delegate = self
let api = YHJsApi()
api.delegate = self
......@@ -306,3 +307,20 @@ extension YHH5WebViewVC {
}
}
//MARK: - UIScrollViewDelegate
extension YHH5WebViewVC : UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
if scrollView.contentOffset.y > 0 {
var alpha = scrollView.contentOffset.y / (k_Height_NavigationtBarAndStatuBar)
if alpha > 1.0 {
alpha = 1.0
}
gk_navBarAlpha = alpha
} else {
gk_navBarAlpha = 0.0
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment