diff --git a/app-ios/Native/Sources/Root/RootScreen.swift b/app-ios/Native/Sources/Root/RootScreen.swift index f38ce830f..e0bcf4295 100644 --- a/app-ios/Native/Sources/Root/RootScreen.swift +++ b/app-ios/Native/Sources/Root/RootScreen.swift @@ -50,10 +50,13 @@ public struct RootScreen: View { @State private var composeMultiplatformEnabled = false @State private var favoriteScreenUiMode: FavoriteScreenUiModePicker.UiMode = .swiftui private let presenter = RootPresenter() + @State private var notificationCoordinator: NotificationNavigationCoordinator? @Dependency(\.notificationUseCase) private var notificationUseCase @Dependency(\.timetableUseCase) private var timetableUseCase + @State private var notificationCoordinator: NotificationNavigationCoordinator? + public init() { UITabBar.appearance().unselectedItemTintColor = UIColor(named: "tab_inactive") } @@ -396,15 +399,41 @@ public struct RootScreen: View { } } .frame(width: geometry.size.width, height: geometry.size.height) + .padding(.horizontal, 12) + .modifier(TabBarBackground()) } .frame(height: 64) .frame(maxWidth: .infinity) - .padding(.horizontal, 12) - .background(.ultraThinMaterial, in: Capsule()) - .overlay(Capsule().stroke(AssetColors.outline.swiftUIColor, lineWidth: 1)) .environment(\.colorScheme, .dark) .padding(.horizontal, 48) } + + /// 背景用のカスタム Modifier + private struct TabBarBackground: ViewModifier { + @Environment(\.accessibilityReduceTransparency) private var reduceTransparency + + func body(content: Content) -> some View { + if reduceTransparency { + // 透明度を下げる設定が有効 → 単色背景 + content + .background(AssetColors.surface.swiftUIColor, in: Capsule()) + .overlay( + Capsule().stroke(AssetColors.outline.swiftUIColor, lineWidth: 1) + ) + } else { + if #available(iOS 26.0, *) { + content + .glassEffect(in: Capsule()) + } else { + content + .background(.ultraThinMaterial, in: Capsule()) + .overlay( + Capsule().stroke(AssetColors.outline.swiftUIColor, lineWidth: 1) + ) + } + } + } + } } #Preview {