Adopt modern SwiftUI patterns now that the minimum target is iOS 18: NavigationStack, .toolbar, .tint, new Tab API with sidebarAdaptable style, and remove iOS 17 availability checks. Add Liquid Glass effect support for iOS 26 in TimerView and fix an optional interpolation warning in AppState. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
29 lines
615 B
Swift
29 lines
615 B
Swift
//
|
|
// LiquidGlassModifiers.swift
|
|
// Nextcloud Cookbook iOS Client
|
|
//
|
|
// Created by Vincent Meilinger on 14.02.26.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct TabBarMinimizeModifier: ViewModifier {
|
|
func body(content: Content) -> some View {
|
|
if #available(iOS 26, *) {
|
|
content.tabBarMinimizeBehavior(.onScrollDown)
|
|
} else {
|
|
content
|
|
}
|
|
}
|
|
}
|
|
|
|
struct BackgroundExtensionModifier: ViewModifier {
|
|
func body(content: Content) -> some View {
|
|
if #available(iOS 26, *) {
|
|
content.backgroundExtensionEffect()
|
|
} else {
|
|
content
|
|
}
|
|
}
|
|
}
|