适配iOS15导航栏

if #available(iOS 13.0, *) {

            let appearance = UINavigationBarAppearance()

            appearance.configureWithOpaqueBackground()

            appearance.titleTextAttributes = [NSAttributedString.Key.font: KLargeFont,NSAttributedString.Key.foregroundColor:Color_292A2D_DEDFDF]

            navigationBar.standardAppearance = appearance

            navigationBar.scrollEdgeAppearance = navigationBar.standardAppearance

        } else {

            self.navigationBar.titleTextAttributes = [NSAttributedString.Key.font: KLargeFont,NSAttributedString.Key.foregroundColor:Color_292A2D_DEDFDF]

            let image = UIImage.xj.create(color: Color_FFFFFF_151515)

        }

posted @ 2022-06-13 10:57  HEJJY  阅读(70)  评论(0编辑  收藏  举报