Skip to content

A view modifier for adding safari view controller as a fullscreen cover

Notifications You must be signed in to change notification settings

ankitdelson-at-work/SafariViewControllerViewModier

Repository files navigation

SafariViewControllerViewModier

A swiftUI View Modifier for presenting the SFSafariViewController.

Usage/Examples

struct ContentView: View {
    
    @State private var webURL: URL? = nil
    
    var body: some View {
        Button {
           webURL = URL(string: "https://www.apple.com/in/")
        } label: {
            Text("open Apple website")
                .padding()
        }
        .safariView(url: $webURL, isFullScreen: true)
    }
}

About

A view modifier for adding safari view controller as a fullscreen cover

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages