how to disable scrolling of list in SwiftUI iOS?

Viewed 3255

I have add list in my content view. Bind data in list using below code. Now i want to disable scrolling in some case and enable in some case. How can i achieve this functionality.

Note: No need ForEach solution.

List(0..<self.titles.count) { index in
                        HStack {
                            Image(self.titles[index]).resizable()
                                .frame(width: 60.0, height: 60.0)
                            Text(self.titles[index])
                        }
                    }
1 Answers

Will disable scrolling of all subViews in List too, but interaction with pickers etc is active

List {
    // ...
}.moveDisabled(true)
Related