YPImagePicker
YPImagePicker copied to clipboard
Cancel button always black colored
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
This is a working example:
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...
https://github.com/Yummypets/YPImagePicker/blob/5f90725766db9d6a9437b82ee63658042eaf67d1/Source/YPPickerVC.swift#L200
https://github.com/Yummypets/YPImagePicker/blob/5f90725766db9d6a9437b82ee63658042eaf67d1/Source/YPImagePicker.swift#L56
how avoid this? color hardcoded. After removed this lines, UINavigationBar.appearance().tintColor - works
Update to the latest version 5.2.1 I had the same issue with the outdated 4.5.0 😉