'How can I customise the colours of this SFSafariView?

I want to customize the colors of an SFSafariView so that the buttons are white while the bars are red. Kind of like this: Example Image

If it's possible, how should I go about implementing this in my code?

Here's the code I'm using for the SFSafariView

struct SafariView: UIViewControllerRepresentable {
        
        let url: URL
        
        func makeUIViewController(context: UIViewControllerRepresentableContext<SafariView>) -> SFSafariViewController {
            return SFSafariViewController(url: url)
        }
        
        func updateUIViewController(_ uiViewController: SFSafariViewController, context: UIViewControllerRepresentableContext<SafariView>) {
            
        }
        
    }

And here's the code I use to show the SFSafariView:

Button(action: {
                self.urlString = "https://www.google.com"
                self.showSafari = true
            }) {
                HStack {
                    Image(systemName: "text.book.closed")
                        .foregroundColor(.black)
                    
                    Text("Google")
                        .foregroundColor(.black))
                }
                
            }
            .fullScreenCover(isPresented: $showSafari) {
                SafariView(url:URL(string: self.urlString)!)
                    .edgesIgnoringSafeArea(.all)
            }

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source