mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
viewmodifier for backwards compat
This commit is contained in:
@@ -57,7 +57,7 @@ struct AddEventView: View {
|
|||||||
selection: $event.symbol
|
selection: $event.symbol
|
||||||
)
|
)
|
||||||
.presentationDetents([.medium])
|
.presentationDetents([.medium])
|
||||||
.presentationSizing(.form)
|
.modifier(presentationSizeForm())
|
||||||
}
|
}
|
||||||
TextField("Event Name", text: $event.name)
|
TextField("Event Name", text: $event.name)
|
||||||
.textFieldStyle(.roundedBorder)
|
.textFieldStyle(.roundedBorder)
|
||||||
|
|||||||
@@ -63,3 +63,13 @@ struct navigationInlineLarge: ViewModifier {
|
|||||||
#endif
|
#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