iOS 13.4 SDK update Navigation Bar title colour is set to Black?

吃可爱长大的小学妹 提交于 2020-04-11 08:15:54

问题


I have a problem with iOS 13.4 update Navigation Bar title is set to Black. the title was set to white in attribute inspector for Navigation Bar before the update but after I update my Xcode to 11.4 and iOS SDK to 13.4.


回答1:


On your all xibs, find the root navigation bar, and set their tint color to default.




回答2:


Swift 5 IOS 13 Interesting thing its will work only in viewDidLoad & viewWillAppear and not working in viewDidAppear

//MARK:- Call this function in viewDidLoad or viewWillAppear method
setNavBarWhite(viewController: self)

this is function

func setNavBarWhite(viewController: UIViewController) {
    if #available(iOS 13.0, *) {
        let appearance = UINavigationBarAppearance()
        appearance.configureWithOpaqueBackground()
        appearance.backgroundColor = .red
        appearance.titleTextAttributes = [.foregroundColor: UIColor.white]
        viewController.navigationController?.navigationBar.standardAppearance = appearance
    } else {
        viewController.navigationController?.navigationBar.barTintColor = .red
    }
} 



回答3:


I have found the solution you have to set Bar Tint to default and use the set the background to color I want.

Screenshot



来源:https://stackoverflow.com/questions/60856135/ios-13-4-sdk-update-navigation-bar-title-colour-is-set-to-black

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!