fix: remove page swipe TabView — use tap-only tabs for swipe-to-delete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -31,18 +31,17 @@ struct FitnessTabView: View {
|
|||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
.padding(.top, 8)
|
.padding(.top, 8)
|
||||||
|
|
||||||
// Content
|
// Content — tap tabs to switch (no page swipe, preserves swipe-to-delete)
|
||||||
TabView(selection: $selectedSubTab) {
|
Group {
|
||||||
TodayView()
|
switch selectedSubTab {
|
||||||
.tag(0)
|
case 0: TodayView()
|
||||||
TemplatesView()
|
case 1: TemplatesView()
|
||||||
.tag(1)
|
case 2: GoalsView()
|
||||||
GoalsView()
|
case 3: FoodLibraryView()
|
||||||
.tag(2)
|
default: TodayView()
|
||||||
FoodLibraryView()
|
|
||||||
.tag(3)
|
|
||||||
}
|
}
|
||||||
.tabViewStyle(.page(indexDisplayMode: .never))
|
}
|
||||||
|
.animation(.easeInOut(duration: 0.2), value: selectedSubTab)
|
||||||
}
|
}
|
||||||
.background(Color.canvas)
|
.background(Color.canvas)
|
||||||
.navigationBarHidden(true)
|
.navigationBarHidden(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user