iOS 13.4 SDK更新 导航栏标题颜色设置为黑色?

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

我有一个问题 iOS 13.4 更新导航栏标题设置为黑色。在更新之前,标题在导航栏的属性检查器中设置为白色,但在我将 Xcode 更新为 11.4 并将 iOS SDK 更新为 13.4 之后。

在所有 xib 中,找到 root navigation bar,并将它们的 tint color 设置为 default

Swift 5 IOS 13 有趣的事 它仅在 viewDidLoad 和 viewWillAppear 中有效,在 viewDidAppear

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

这是函数

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
    }
} 

这是 Xcode Interface Builder 中的错误。 Apple 发布更新 Xcode 11.4.1

来自 Apple 开发人员发行说明

Interface Builder

Fixed an issue that caused some UINavigationBar appearance properties set in storyboard and XIB documents to be ignored when building with Xcode 11.4. (60883063) (FB7639654)

https://developer.apple.com/documentation/xcode_release_notes/xcode_11_4_1_release_notes