diff --git a/README.md b/README.md index de80a00..b45e785 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ # FullScreenSafariView -A way to present a full-screen SFSafariViewController in SwiftUI. +A clean way to present a full-screen SFSafariViewController with a push transition in SwiftUI. diff --git a/Sources/FullScreenSafariView/FullScreenSafariView.swift b/Sources/FullScreenSafariView/FullScreenSafariView.swift index 6dcf9dd..9c6323e 100644 --- a/Sources/FullScreenSafariView/FullScreenSafariView.swift +++ b/Sources/FullScreenSafariView/FullScreenSafariView.swift @@ -69,6 +69,11 @@ struct SafariViewModifier: ViewModifier { public extension View { + /// Presents a `SFSafariViewController`. + /// + /// - Parameters: + /// - isPresented: A `Binding` to whether the `SFSafariViewController` is presented. + /// - content: A closure returning the `URL` to load. func safariView(isPresented: Binding, content: () -> URL) -> some View { let url = content() return self.modifier(SafariViewModifier(isPresented: isPresented, url: url))