0

I am working on a List view in SwiftUI. I have a section at the bottom that is collapsed when presented. Clicking on the section header expands the list below the tab bar, but there is no visual indication to the user.

Is there an easy way to force the view to scroll after expanding the section, so the user sees there are additional rows?

Thanks

var body: some View {
        Section(header: Text("Archived").onTapGesture {
            self.sectionState.toggle()
        }) {
            if sectionState {
                ForEach(filteredArchives) { listVM in
                NavigationLink(destination: ListViewDetail(listVM: listVM)) {
                    ListView(listVM: listVM)
                        .frame(width: nil, height: 75)
                }

                }
            }
        }
    }
Craig
  • 49
  • 2
  • Look here [SwiftUI: How to scroll List programmatically?](https://stackoverflow.com/questions/60855852/swiftui-how-to-scroll-list-programmatically-solution) – Asperi May 10 '20 at 04:39
  • Thanks. I will try this as a workaround, but I would still be curious if there is a proper way built into SwiftUI to handle this situation. I've looked through various documentation and tutorials and did not find an answer. – Craig May 11 '20 at 16:30

0 Answers0