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

后端 未结 7 1758
野的像风
野的像风 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:22

    For Swift, IOS 8-10 As rintaro mentioned, I think the main issue here is changing the default translucent property of the picker navigationBar:

    picker.navigationBar.translucent = false

    This will cause the the navigation bar to use the UINavigationBar appearance if you set this somewhere in your app.

    If you need another color you can use
    picker.navigationBar.barTintColor = UIColor.someColor

提交回复
热议问题