How do you color/customize the UIImagePickerController's Navigation Bar?

后端 未结 7 1630
野的像风
野的像风 2021-02-02 09:48

What is the correct way to color the UIImagePickerController\'s nav bar?
I merely tried to see the background color but I\'m getting a faded color as seen in the image bel

7条回答
  •  走了就别回头了
    2021-02-02 10:17

    Swift = IOS 8 || 9

    Just put this method

    func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) 
    {
         imagePicker.navigationBar.tintColor = .whiteColor()
         imagePicker.navigationBar.titleTextAttributes = [
         NSForegroundColorAttributeName : UIColor.whiteColor()
         ]
    
    }
    

提交回复
热议问题