HomeiOS Developmentios - SwiftUI. NavigationLink inside TabView. Surprising conduct

ios – SwiftUI. NavigationLink inside TabView. Surprising conduct


I’ve View with Checklist inside NavigationStack

struct TestView: View {
    var physique: some View {
        NavigationStack {
            Checklist {
                NavigationLink {
                    Textual content("1")
                } label: {
                    Textual content("Label1")
                }
                NavigationLink {
                    Textual content("2")
                } label: {
                    Textual content("Label2")
                }
                NavigationLink {
                    Textual content("3")
                } label: {
                    Textual content("Label3")
                }
            }
        }
    }
}

This view inside TabView with modificator .tabViewStyle(.web page(indexDisplayMode: .by no means))

var physique: some View {
    VStack(spacing: 0) {
        SearchField(searchText: $searchText, activeTab: activeTab)
        TabIndicatorView()
            .padding(.high, 20)
        TabView(choice: $activeTab) {
            ForEach(Tab.allCases, id: .rawValue) { tab in
                SelectedTab(selectedTab: tab, activeTab: activeTab, searchText: $searchText)
                    .tag(tab)
            }
        }
        .padding(.high, 20)
        .tabViewStyle(.web page(indexDisplayMode: .by no means))
        .body(maxHeight: .infinity)
    }
}

It was made to have high swipeable tabs.
enter image description here

Downside:
The primary two rows usually are not pressable. And if I attempt to scroll to the highest, a white row seems on high of the record.

enter image description here

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments