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

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

    Try:

    picker.navigationBar.translucent = false
    picker.navigationBar.barTintColor = .redColor()
    

    Instead of

    picker.navigationBar.backgroundColor = UIColor.redColor()
    

    If you want translucent effects, leave translucent = true as default.

提交回复
热议问题