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
@@ -10,43 +10,6 @@ import Compound
import SwiftUI
extension View {
// MARK: iOS 18
/// Uses the old page style modal so that on iPadOS 18 the presentation detents have no effect.
@ViewBuilder func backportPresentationSizingPage() -> some View {
if #available(iOS 18.0, *) {
presentationSizing(.page)
} else {
self
}
}
/// A convenience modifier to conditionally apply `.navigationTransition(.zoom(…))` when available.
@ViewBuilder func backportNavigationTransitionZoom(sourceID: some Hashable, in namespace: Namespace.ID) -> some View {
if #available(iOS 18.0, *) {
navigationTransition(.zoom(sourceID: sourceID, in: namespace))
} else {
self
}
}
/// A convenience modifier to conditionally apply `.matchedTransitionSource(…)` when available.
@ViewBuilder func backportMatchedTransitionSource(id: some Hashable, in namespace: Namespace.ID) -> some View {
if #available(iOS 18.0, *) {
matchedTransitionSource(id: id, in: namespace)
} else {
self
}
}
@ViewBuilder func backportAccessibilityHint(_ hint: String, isEnabled: Bool) -> some View {
if #available(iOS 18, *) {
accessibilityHint(hint, isEnabled: isEnabled)
} else {
self
}
}
// MARK: iOS 26
@ViewBuilder func backportTabBarMinimizeBehaviorOnScrollDown() -> some View {