Ypimagepicker: Cancel button always black colored

Created on 7 Jul 2020  路  4Comments  路  Source: Yummypets/YPImagePicker

I have tried to set the tint color of the navigation bar as suggested in ReadMe but still the cancel button always of black color. How to make it of a different colors?

   let attrs = [
        NSAttributedString.Key.foregroundColor: UIColor.white,
        NSAttributedString.Key.font: UIFont.boldFont()
    ]

    UINavigationBar.appearance().barTintColor = UIColor(hexInt: 0x00113A)
    UINavigationBar.appearance().titleTextAttributes = attrs
    UINavigationBar.appearance().tintColor = UIColor.white.withAlphaComponent(0.7)

    UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedString.Key.font: UIFont.boldFont()], for: .normal)

Also, can we change picker background color i.e. white currently?

Environment (please complete the following information):

  • Device: iPhone 7
  • OS: 10.15.4
  • Xcode Version: 11.4.1
  • Swift Version: 5.1

Installation Type

  • Cocoapods

Most helpful comment

This is a working example:
```swift
let picker = YPImagePicker(configuration: config)
picker.navigationBar.tintColor = .red

All 4 comments

This is a working example:
```swift
let picker = YPImagePicker(configuration: config)
picker.navigationBar.tintColor = .red

also black in sample project in this repo, left bar button items not changed color

UINavigationBar.appearance().tintColor

not working

This is a working example:

        let picker = YPImagePicker(configuration: config)
        picker.navigationBar.tintColor = .red

worked, but not in album...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DamascenoRafael picture DamascenoRafael  路  6Comments

nickeyzzz picture nickeyzzz  路  6Comments

javiermanzo picture javiermanzo  路  6Comments

fschaus picture fschaus  路  7Comments

kerimsener picture kerimsener  路  6Comments