How do I change the background color of the "... Want to Access Photos" dialog box?

Sorry this may seem like an obvious solution, but I can't figure it out.

I use UIImagePickerController

to take or select photos from a photo gallery.

The first time my application is loaded and the application needs access to the Photo Library, the Application Name Want to Access Photos dialog appears.

Currently the background color is black:

enter image description here

How can I change the background color from black to white (or some other color)?

I'm not really sure which look this is part of. I tried the following, resulting in nothing:

picker.cameraOverlayView?.backgroundColor = UIColor.white

      

How can I access this background color of this view to change it?

Thank!

+3


source to share


2 answers


The solution is to access the property of the view

object UIImagePickerController

and then customize it view

backgroundColor

to your own choice like this:



let picker = UIImagePickerController()
picker.sourceType = .photoLibrary
picker.view.backgroundColor = UIColor.white

      

0


source


I think space CFBundleDisplayName

. You are trying to change the name of your application. Info.plist

file contains a key: CFBundleDisplayName

with a non-empty string value.



-3


source







All Articles