fix: remove page-swipe TabView — conflicts with swipe-to-delete
Replaced .tabViewStyle(.page) with Group/switch. Tab switching only via top buttons, no horizontal page swipe. This prevents swipe-to-delete from accidentally switching tabs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,8 @@
|
|||||||
// Xcode user data — changes every build, ignore
|
// Xcode generated files — ignore all of these
|
||||||
Platform.xcodeproj/xcuserdata
|
Platform.xcodeproj/xcuserdata
|
||||||
Platform.xcodeproj/project.xcworkspace/xcuserdata
|
Platform.xcodeproj/project.xcworkspace
|
||||||
Platform.xcodeproj/project.xcworkspace/xcshareddata
|
*.xcuserstate
|
||||||
|
.DS_Store
|
||||||
// Build artifacts
|
|
||||||
DerivedData
|
DerivedData
|
||||||
build
|
build
|
||||||
.build
|
.build
|
||||||
|
|
||||||
// macOS files
|
|
||||||
.DS_Store
|
|
||||||
*.xcuserstate
|
|
||||||
|
|||||||
@@ -31,18 +31,16 @@ struct FitnessTabView: View {
|
|||||||
.padding(.horizontal)
|
.padding(.horizontal)
|
||||||
.padding(.top, 8)
|
.padding(.top, 8)
|
||||||
|
|
||||||
// Content
|
// Content — no page swipe (conflicts with 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))
|
|
||||||
}
|
}
|
||||||
.background(Color.canvas)
|
.background(Color.canvas)
|
||||||
.navigationBarHidden(true)
|
.navigationBarHidden(true)
|
||||||
|
|||||||
Reference in New Issue
Block a user