younger_times
2023-04-24 a43a3dcf34a398b0fe693304fa00feb83a876ce8
BrokerDriver/Base/BaseNavigationController.swift
@@ -17,20 +17,31 @@
        self.navigationBar.titleTextAttributes = [.font:UIFont.systemFont(ofSize: 18, weight: .medium), .foregroundColor:UIColor.black]
        self.navigationBar.tintColor = UIColor.black
        self.navigationBar.shadowImage = UIImage()
        self.navigationBar.isTranslucent = false
        self.navigationBar.isTranslucent = true
        self.delegate = self
        self.popDelegate = self.interactivePopGestureRecognizer?.delegate
        if #available(iOS 15.0, *) {
            let bar = UINavigationBarAppearance()
            bar.configureWithOpaqueBackground() //消除15的黑框
            bar.backgroundEffect = nil
            bar.shadowColor = nil
            bar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
            bar.backgroundColor = UIColor.white
            navigationBar.scrollEdgeAppearance = bar //顶部透明
            navigationBar.standardAppearance = bar
            let scrollBar = UINavigationBarAppearance()
            scrollBar.configureWithOpaqueBackground()
            scrollBar.backgroundEffect = nil
            scrollBar.shadowColor = nil
            scrollBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
            scrollBar.backgroundColor = UIColor.clear
            let standardBar = UINavigationBarAppearance()
            standardBar.configureWithOpaqueBackground()
            standardBar.backgroundEffect = nil
            standardBar.shadowColor = nil
            standardBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
            standardBar.backgroundColor = UIColor.clear
            navigationBar.scrollEdgeAppearance = scrollBar //顶部透明
            navigationBar.standardAppearance = standardBar
        }else {
            navigationBar.titleTextAttributes = [.foregroundColor:Def_NavFontColor,.font:Def_NavFont]
        }