From a56ff03fc62bb894160f9b71fc54f66e77e48712 Mon Sep 17 00:00:00 2001 From: 无故事王国 <841720330@qq.com> Date: 星期三, 28 六月 2023 18:30:23 +0800 Subject: [PATCH] "使用福利"大部分UI --- WanPai/Base/BaseNav.swift | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/WanPai/Base/BaseNav.swift b/WanPai/Base/BaseNav.swift index 0d5b002..3523b1b 100644 --- a/WanPai/Base/BaseNav.swift +++ b/WanPai/Base/BaseNav.swift @@ -11,6 +11,10 @@ class BaseNav: UINavigationController,UINavigationControllerDelegate { private var popDelegate: UIGestureRecognizerDelegate? + + + /// 需要透明Nav的VC + private var lucencyVCs = [RechargeRecordVC.self,RechargeCenterVC.self] private let img = UIImage.jq_gradient([UIColor(hexStr: "#FD8C02"),UIColor(hexStr: "#FD7202")], size: CGSize(width: JQ_ScreenW, height: JQ_NavBarHeight), radius: 0, locations: [0,1], direction: .vertical) @@ -54,7 +58,10 @@ } open func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) { - if navigationController.viewControllers.count == 1{ + + let status = lucencyVCs.contains(where: {$0 == viewController.classForCoder}) + + if navigationController.viewControllers.count == 1 || status{ navigationBar.standardAppearance.backgroundImage = nil navigationBar.scrollEdgeAppearance?.backgroundImage = nil }else{ -- Gitblit v1.7.1