feat: support BackportSelectionTextField on iOS 18

This commit is contained in:
Nolin McFarland
2026-05-17 12:33:56 -04:00
parent 69cab3d808
commit ed52160612

View File

@@ -132,8 +132,8 @@ enum BackportNSGlassStyle {
#endif
}
/// Backported `TextField` that supports text selection on macOS 15 and up. The `selection` has no
/// effect on versions below macOS 15.
/// Backported `TextField` that supports text selection on macOS 15/iOS 18 and up. The `selection`
/// has no effect on versions below macOS 15/iOS 18.
struct BackportSelectionTextField: View {
private let titleKey: LocalizedStringKey
@Binding private var text: String
@@ -150,7 +150,7 @@ struct BackportSelectionTextField: View {
}
var body: some View {
if #available(macOS 15, *) {
if #available(iOS 18.0, macOS 15, *) {
TextField(
titleKey,
text: _text,