适配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 @   HEJJY  阅读(74)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
点击右上角即可分享
微信分享提示