How to disable digital crown to scroll a List in swiftui

Hello, I have a TabView containing multiple views where one of them contains a list of items. The digital crown on the apple watch does not allow me to scroll the items in the tabview but only scrolls the list of items. Is there any way to disable that the scrolling of the list is done by the wheel or even a way to prioritize the digital crown to scroll the tabView and not the list?

Thanks

Replies

What should be happening: the List scrolls to its edges and then the TabView scrolls beyond the edge of the List. Many first-party apps demonstrate this behavior (and yes, they are written in SwiftUI). If you are seeing something different, it’d be helpful to see your code. If you can share it here, please do; if not, please attach it to a Feedback and post the FB number here. Thanks!

Thanks for your feedback. Here is my code:

MainView

 var body: some View {
        if (notificationRB == true || DEBUG) {
            TabView {
                RingBellMainView(requests: [], delegate: delegate, isOffline: true, isConfigured: false, ringBellStatus: .not_configured, pushNotificationStatus: .not_configured, isLoading: false)
                LocalScenariosTableView(scenarios: [], delegate: delegate, isLoading: false)
                GlobalScenariosTableView(scenarios: [], delegate: delegate, isLoading: false)
                SettingsView(isSilentModeEnabled: delegate.isSilentModeEnabled, delegate: delegate)
            }
            //.tabViewStyle(.verticalPage(transitionStyle: .blur))
            .tabViewStyle(.page(indexDisplayMode: .always))
            .onAppear(perform: {
                delegate.ringBellService.register(model: self.model)
                model.setup(mainView: self)
            })
        } 
}

LocalScenariosTableView

var body: some View {
        NavigationView {
            if (scenarios.isEmpty) {
                LocalScenariosEmptyState()
                    .onAppear(perform: {
                        delegate.scenarioService.register(model: self.model)
                        model.setup(tableView: self)
                        delegate.scenarioService.refresh(global: false, complete: {
                            scenarios in
                        })
                    })
                    .onReceive(timer, perform: { _ in
                        if (!isLoading) {
                            self.delegate.scenarioService.refresh(global: false, complete: {
                                scenarios in
                            })
                        }
                    })
            } else {
                List {
                    ForEach(scenarios) { scenario in
                        ScenariosTableViewCell(scenario: scenario, delegate: self.delegate, showProgressView: Binding.constant(false), isLoading: Binding.constant(false))
                    }
                    .listRowPlatterColor(.black.opacity(0.6))
                    .listRowInsets(.init(top: 4, leading: 8, bottom: 4, trailing: 0))
                    .clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
                }
                .background(Image("bg")
                    .resizable()
                    .ignoresSafeArea()
                    .scaledToFill())
                .scrollContentBackground(.hidden)
                .toolbar {
                    ToolbarItem(placement: .topBarLeading) {
                        Text("aw_local_scenarios".localized)
                            .font(.headline)
                    }
                }
                .onAppear(perform: {
                    delegate.scenarioService.register(model: self.model)
                    model.setup(tableView: self)
                    delegate.scenarioService.refresh(global: false, complete: {
                        scenarios in
                    })
                })
                .onReceive(timer, perform: { _ in
                    if (!isLoading) {
                        self.delegate.scenarioService.refresh(global: false, complete: {
                            scenarios in
                        })
                    }
                })
            }
        }
    }

Thanks!

Sorry I posted the wrong code. Here is the MainView

MainView

 var body: some View {
        if (notificationRB == true || DEBUG) {
            TabView {
                RingBellMainView(requests: [], delegate: delegate, isOffline: true, isConfigured: false, ringBellStatus: .not_configured, pushNotificationStatus: .not_configured, isLoading: false)
                LocalScenariosTableView(scenarios: [], delegate: delegate, isLoading: false)
                GlobalScenariosTableView(scenarios: [], delegate: delegate, isLoading: false)
                SettingsView(isSilentModeEnabled: delegate.isSilentModeEnabled, delegate: delegate)
            }
            .tabViewStyle(.verticalPage(transitionStyle: .blur))
            .tabViewStyle(.page(indexDisplayMode: .always))
            .onAppear(perform: {
                delegate.ringBellService.register(model: self.model)
                model.setup(mainView: self)
            })
        } 
}