From ddda04369df3909b1eb46af5fb291a49ca98d64b Mon Sep 17 00:00:00 2001 From: Hariharan Mudaliar Date: Sun, 1 Mar 2026 02:22:02 +0530 Subject: [PATCH] Fix: Transition issues --- DynamicIsland/ContentView.swift | 1 - DynamicIsland/components/Tabs/TabSelectionView.swift | 9 ++++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/DynamicIsland/ContentView.swift b/DynamicIsland/ContentView.swift index 44ca54b..8c2bb5d 100644 --- a/DynamicIsland/ContentView.swift +++ b/DynamicIsland/ContentView.swift @@ -774,7 +774,6 @@ struct ContentView: View { .transition(tabSwitchTransition) } } - .clipped() .zIndex(1) .allowsHitTesting(vm.notchState == .open) .blur(radius: abs(gestureProgress) > 0.3 ? min(abs(gestureProgress), 8) : 0) diff --git a/DynamicIsland/components/Tabs/TabSelectionView.swift b/DynamicIsland/components/Tabs/TabSelectionView.swift index c75ab59..caf7efe 100644 --- a/DynamicIsland/components/Tabs/TabSelectionView.swift +++ b/DynamicIsland/components/Tabs/TabSelectionView.swift @@ -107,12 +107,10 @@ struct TabSelectionView: View { let isSelected = isSelected(tab) let activeAccent = tab.accentColor ?? .white TabButton(label: tab.label, icon: tab.icon, selected: isSelected) { - withAnimation(.smooth(duration: 0.3)) { - if tab.view == .extensionExperience { - coordinator.selectedExtensionExperienceID = tab.experienceID - } - coordinator.currentView = tab.view + if tab.view == .extensionExperience { + coordinator.selectedExtensionExperienceID = tab.experienceID } + coordinator.currentView = tab.view } .frame(height: 26) .foregroundStyle(isSelected ? activeAccent : .gray) @@ -131,6 +129,7 @@ struct TabSelectionView: View { } } } + .animation(.smooth(duration: 0.3), value: coordinator.currentView) .clipShape(Capsule()) .onAppear { ensureValidSelection(with: tabs)