viewmodifier for backwards compat

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

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ struct AddEventView: View {
selection: $event.symbol
)
.presentationDetents([.medium])
.presentationSizing(.form)
.modifier(presentationSizeForm())
}
TextField("Event Name", text: $event.name)
.textFieldStyle(.roundedBorder)
+10
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
}
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.