Change title color of navigation bar in MFMailComposeViewController in iOS 12 not working [duplicate]

/// UINavigationBar
     let navBarAppearance = UINavigationBar.appearance()
     navBarAppearance.barTintColor = .red
     navBarAppearance.tintColor = .white
     navBarAppearance.backgroundColor = .red

     navBarAppearance.titleTextAttributes = [
         .foregroundColor: UIColor.white,
         .font: UIFont.systemFontSize
     ]
     navBarAppearance.largeTitleTextAttributes = [
         .foregroundColor: UIColor.white,
         .font: UIFont.smallSystemFontSize
     ]

     let barButtonAppearance = UIBarButtonItem.appearance()
     barButtonAppearance.setTitleTextAttributes([.font: UIFont.systemFontSize], for: .normal)

     navBarAppearance.isTranslucent = false


     if #available(iOS 13.0, *) {
         let appearance = UINavigationBarAppearance()
         appearance.configureWithOpaqueBackground()
    
         appearance.backgroundColor = navBarAppearance.backgroundColor
         appearance.titleTextAttributes = navBarAppearance.titleTextAttributes ?? [:]
         appearance.largeTitleTextAttributes = navBarAppearance.largeTitleTextAttributes ?? [:]
    
         navBarAppearance.standardAppearance = appearance
         navBarAppearance.scrollEdgeAppearance = appearance
     }

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)