mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
drop iOS 17 and removed all #available and #unavaible checks for 17 and 18
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user