-1

I have View with List inside NavigationStack

struct UsersView: View {
  var body: some View {
    NavigationStack {
      List {
        NavigationLink {
          Text("1")
        } label: {
          Text("Label1")
        }
        NavigationLink {
          Text("2")
        } label: {
          Text("Label2")
        }
        NavigationLink {
          Text("3")
        } label: {
          Text("Label3")
        }
      }
    }
  }
}

This view inside the TabView with a modifier .tabViewStyle(.page(indexDisplayMode: .never))

var body: some View {
  VStack(spacing: 0) {
    SearchField(searchText: $searchText, activeTab: activeTab)
    TabIndicatorView()
      .padding(.top, 20)
    TabView(selection: $activeTab) {
      ForEach(Tab.allCases, id: \.rawValue) { tab in
        SelectedTab(selectedTab: tab, activeTab: activeTab, searchText: $searchText)
          .tag(tab)
      }
    }
    .padding(.top, 20)
    .tabViewStyle(.page(indexDisplayMode: .never))
    .frame(maxHeight: .infinity)
  }
}

It was made to have top swipeable tabs.

show the tabs image

Problem: The first two rows are not pressable. And if I try to scroll to the top, a white row appears on top of the list.

show the white row image

nespish
  • 1
  • 2

0 Answers0