viewmodifier for backwards compat

This commit is contained in:
neon443
2025-06-14 11:20:29 +01:00
parent cb26c69492
commit 4c9e72fad2
2 changed files with 11 additions and 1 deletions

View File

@@ -63,3 +63,13 @@ struct navigationInlineLarge: ViewModifier {
#endif
}
}
struct presentationSizeForm: ViewModifier {
func body(content: Content) -> some View {
if #available(iOS 18, macOS 15, *) {
content.presentationSizing(.form)
} else {
content
}
}
}