Post

Replies

Boosts

Views

Activity

Reply to customize PHPicker's Navigationbar color in iOS15
I encountered the same problem. I applied the accentColor modifier of the view to change colour. //SwiftuiView.swift PhotoPicker(isPresented: $addImages)                     .accentColor(.indigo) //PhotoPicker.swift struct PhotoPicker: UIViewControllerRepresentable {     @Binding var isPresented: Bool       func makeUIViewController(context: Context) -> some UIViewController {     var configuration = PHPickerConfiguration()     configuration.filter = .images // filter only to images     configuration.selectionLimit = 5 // ignore limit     let photoPickerViewController = PHPickerViewController(configuration: configuration)     photoPickerViewController.delegate = context.coordinator     return photoPickerViewController   }      func updateUIViewController(_ uiViewController: UIViewControllerType, context: Context) { }      func makeCoordinator() -> Coordinator {     Coordinator(self)   }      class Coordinator: PHPickerViewControllerDelegate {     private let parent: PhotoPicker          init(_ parent: PhotoPicker) {       self.parent = parent     }          func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {         parent.isPresented = false     }   } }
Apr ’22