0
import SwiftUI
import SafariServices

struct ContentView: View {
  
    @State var urlString = "http://pistore.info"

    var body: some View {
        VStack {
            SafariView(url: URL(string: urlString)!)
        }
        
        
    }
}
struct SafariView: UIViewControllerRepresentable {
    let url: URL
    func makeUIViewController(context: UIViewControllerRepresentableContext<SafariView>) -> SFSafariViewController {
        return SFSafariViewController(url: url)
    }
    func updateUIViewController(_ uiViewController: SFSafariViewController, context: UIViewControllerRepresentableContext<SafariView>) {
    }
}

If I use WebKit, there are many things that don't work, so I decided to use Safari Service

enter image description here

I want to get rid of the red bar in my hair

DEUK_YEONG
  • 51
  • 4
  • Does this answer your question? [How to hide the done button and search bar in SafariViewController](https://stackoverflow.com/questions/36612960/how-to-hide-the-done-button-and-search-bar-in-safariviewcontroller) – Ranoiaetep Nov 05 '22 at 13:51

0 Answers0