| | |
| | | |
| | | /// 需要透明Nav的VC |
| | | private var lucencyVCs = [LoginVC.self] |
| | | private var whiteStyleVCs = [HomeItemDetailVC.self] |
| | | private var whiteStyleVCs = [HomeItemDetailVC.self,CourseDetialVC.self,HomeItemDetailVC.self,CourseDetialVideoVC.self,PavilionDetailVC.self] |
| | | |
| | | open override func viewDidLoad() { |
| | | super.viewDidLoad() |
| | | self.navigationBar.barTintColor = .white |
| | | self.navigationBar.barTintColor = .red |
| | | self.navigationBar.tintColor = UIColor.black |
| | | self.navigationBar.shadowImage = UIImage() |
| | | self.navigationBar.isTranslucent = true |
| | |
| | | let status = lucencyVCs.contains(where: {$0 == viewController.classForCoder}) |
| | | if (navigationController.viewControllers.count == 1 || status){ |
| | | if #available(iOS 15.0, *) { |
| | | navigationBar.standardAppearance.backgroundColor = .white |
| | | navigationBar.standardAppearance.backgroundColor = .clear |
| | | navigationBar.scrollEdgeAppearance?.backgroundColor = .clear |
| | | }else{ |
| | | navigationBar.setBackgroundImage(UIImage(), for: .default) |