Skip to content

Commit 2a03caf

Browse files
committed
Add a documentation for the .safariView(isPresented:content:)
1 parent 46a2231 commit 2a03caf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
# FullScreenSafariView
77

8-
A way to present a full-screen SFSafariViewController in SwiftUI.
8+
A clean way to present a full-screen SFSafariViewController with a push transition in SwiftUI.

Sources/FullScreenSafariView/FullScreenSafariView.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ struct SafariViewModifier: ViewModifier {
6969

7070
public extension View {
7171

72+
/// Presents a `SFSafariViewController`.
73+
///
74+
/// - Parameters:
75+
/// - isPresented: A `Binding` to whether the `SFSafariViewController` is presented.
76+
/// - content: A closure returning the `URL` to load.
7277
func safariView(isPresented: Binding<Bool>, content: () -> URL) -> some View {
7378
let url = content()
7479
return self.modifier(SafariViewModifier(isPresented: isPresented, url: url))

0 commit comments

Comments
 (0)