//
//  LLQ_BaseNavigationController.swift
//  Scanner
//
//  Created by FastKey on 2021/7/1.
//

import Foundation
import UIKit
class LLQ_BaseNavigationController: UINavigationController {
    
    override var childForStatusBarStyle: UIViewController? {
        return self.topViewController
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationBar.isTranslucent = false
        if #available(iOS 13.0, *) {
            let navigationBarAppearance = UINavigationBarAppearance()
            if navigationController?.navigationBar.isTranslucent ?? false {
                navigationBarAppearance.configureWithTransparentBackground()
            } else {
                navigationBarAppearance.configureWithOpaqueBackground()
            }
            navigationBarAppearance.backgroundColor = .white
            navigationBarAppearance.backgroundImage = UIImage.init(color: .white)
            navigationBarAppearance.shadowImage = UIImage()
            navigationBarAppearance.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.init(hexString: "#333333")!]
            navigationController?.navigationBar.standardAppearance = navigationBarAppearance
            navigationController?.navigationBar.scrollEdgeAppearance = navigationBarAppearance
            navigationController?.navigationBar.barTintColor = UIColor.init(hexString: "#ffffff")

        } else {

        }
        
    }
}
