mirror of
https://github.com/neon443/NearFuture.git
synced 2026-11-30 12:24:48 +00:00
viewmodifier for backwards compat
This commit is contained in:
2 files changed
+11
-1
No files matched your search
@@ -57,7 +57,7 @@ struct AddEventView: View {
|
||||
selection: $event.symbol
|
||||
)
|
||||
.presentationDetents([.medium])
|
||||
.presentationSizing(.form)
|
||||
.modifier(presentationSizeForm())
|
||||
}
|
||||
TextField("Event Name", text: $event.name)
|
||||
.textFieldStyle(.roundedBorder)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||