drop iOS 17 and removed all #available and #unavaible checks for 17 and 18

This commit is contained in:
Mauro Romito
2025-11-28 14:37:37 +01:00
committed by Mauro
parent 7496f30966
commit 656648fc7c
12 changed files with 79 additions and 160 deletions
@@ -123,12 +123,12 @@ public struct ListRow<Icon: View, DetailsIcon: View, CustomContent: View, Select
Button(action: action) {
RowContent(details: details, accessory: .selection(isSelected)) { label }
}
.isToggle()
.accessibilityAddTraits(.isToggle)
case .multiSelection(let isSelected, let action):
Button(action: action) {
RowContent(details: details, accessory: .multiSelection(isSelected)) { label }
}
.isToggle()
.accessibilityAddTraits(.isToggle)
case .textField(let text, let axis):
TextField(text: text, axis: axis) {
Text(label.title ?? "")
@@ -259,17 +259,6 @@ private extension TextField {
}
}
private extension Button {
/// Adds the `isToggle` accessibility trait on iOS 17+
@ViewBuilder func isToggle() -> some View {
if #available(iOS 17.0, *) {
accessibilityAddTraits(.isToggle)
} else {
self
}
}
}
// MARK: - Previews
// swiftlint:disable print_deprecation