How to modify the appearance of PHPickerViewController?
Asked Answered
E

2

7

I have a problem with the new PHPickerViewController on iOS 14. When my app request for photo library authorization, the system will prompt the user with three options, and if the user selects "select photos", the system will present a PHPickerViewController in which the user can choose photos and videos that my app can access.

But now the navigation bar of the system PHPickerViewController looks so awful that it has a black background and black text color (see the links below). I'm wondering how can customize its appearance.

Any replies are very much appreciated!

PHPickerViewController

Earmark answered 27/10, 2020 at 4:30 Comment(1)
Did you find a solution to this? Having the same issue, the modal presentation of the Pickers do not take on the Navigation Appearance of the app.Ceratodus
A
0

I found adjusting the global color for the Global navigation just before presentation helps. Then switch it back on return. Its hacky and annoying but it works.

UINavigationBar.appearance().tintColor = UIColor.white
UINavigationBar.appearance().barTintColor = UIColor(red: 36/255, green: 88/255, blue: 128/255, alpha: 1.0)

etc.

Alpenglow answered 12/11, 2021 at 16:37 Comment(0)
G
0

Currently you can only modify it by setting your Navigation Tint Colour:

UINavigationBar.appearance().tintColor = .red

but, it effects the entire app.

Geocentric answered 30/4, 2024 at 14:32 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.