11extension View {
22 /// Sets the available detents (heights) for a sheet presentation.
33 ///
4- /// This modifier only affects the sheet presentation itself when applied to the
5- /// top-level view within a sheet. It allows users to resize the sheet to different
6- /// predefined heights.
4+ /// This modifier only affects the sheet presentation itself.
5+ /// It allows users to resize the sheet to different predefined heights.
76 ///
8- /// supported platforms: iOS (ignored on unsupported platforms)
9- /// ignored on: older than iOS 15
10- /// fraction and height fall back to medium on iOS 15 and work as you'd expect on >=16
7+ /// - Supported platforms: iOS 15+ (ignored on unsupported platforms)
8+ /// - `.fraction` and `.height` fall back to `.medium` on iOS 15 and earlier
119 ///
1210 /// - Parameter detents: A set of detents that the sheet can be resized to.
1311 /// - Returns: A view with the presentation detents preference set.
@@ -17,50 +15,47 @@ extension View {
1715
1816 /// Sets the corner radius for a sheet presentation.
1917 ///
20- /// This modifier only affects the sheet presentation itself when applied to the
21- /// top-level view within a sheet. It does not affect the content's corner radius.
18+ /// This modifier only affects the sheet presentation itself.
19+ /// It does not affect the content's corner radius.
2220 ///
23- /// supported platforms: iOS 15+, Gtk4 (ignored on unsupported platforms)
21+ /// - Supported platforms: iOS 15+, Gtk4 (ignored on unsupported platforms)
2422 ///
25- /// - Parameter radius: The corner radius in pixels .
23+ /// - Parameter radius: The corner radius in points .
2624 /// - Returns: A view with the presentation corner radius preference set.
2725 public func presentationCornerRadius( _ radius: Double ) -> some View {
2826 preference ( key: \. presentationCornerRadius, value: radius)
2927 }
3028
3129 /// Sets the visibility of a sheet's drag indicator.
3230 ///
33- /// This modifier only affects the sheet presentation itself when applied to the
34- /// top-level view within a sheet.
31+ /// This modifier only affects the sheet presentation itself.
3532 ///
36- /// supported platforms: iOS 15+ (ignored on unsupported platforms)
33+ /// - Supported platforms: iOS 15+ (ignored on unsupported platforms)
3734 ///
38- /// - Parameter visibiliy : visible or hidden
39- /// - Returns: A view with the presentation corner radius preference set.
35+ /// - Parameter visibility : visible or hidden
36+ /// - Returns: A view with the presentationDragIndicatorVisibility preference set.
4037 public func presentationDragIndicatorVisibility(
41- _ visibility: PresentationDragIndicatorVisibility
38+ _ visibility: Visibility
4239 ) -> some View {
4340 preference ( key: \. presentationDragIndicatorVisibility, value: visibility)
4441 }
4542
4643 /// Sets the background of a sheet.
4744 ///
48- /// This modifier only affects the sheet presentation itself when applied to the
49- /// top-level view within a sheet.
45+ /// This modifier only affects the sheet presentation itself.
5046 ///
5147 /// - Parameter color: the background color
52- /// - Returns: A view with the presentation corner radius preference set.
48+ /// - Returns: A view with the presentationBackground preference set.
5349 public func presentationBackground( _ color: Color ) -> some View {
5450 preference ( key: \. presentationBackground, value: color)
5551 }
5652
57- /// Sets wether the user should be able to dismiss the sheet themself.
53+ /// Sets whether the user should be able to dismiss the sheet themself.
5854 ///
59- /// This modifier only affects the sheet presentation itself when applied to the
60- /// top-level view within a sheet.
55+ /// This modifier only affects the sheet presentation itself.
6156 ///
62- /// - Parameter isDisabled: is it disabled
63- /// - Returns: A view with the presentation corner radius preference set.
57+ /// - Parameter isDisabled: Whether interactive dismissal is disabled
58+ /// - Returns: A view with the interactiveDismissDisabled preference set.
6459 public func interactiveDismissDisabled( _ isDisabled: Bool = true ) -> some View {
6560 preference ( key: \. interactiveDismissDisabled, value: isDisabled)
6661 }
0 commit comments