Contents

elegantchaos/pageview

A slightly more flexible SwiftUI PageView.

Usage:


        PageView(selection: $selection, indexAlignment: .bottomLeading, indexPadding: 40.0) {
            ForEach(items) { item in
                Text(item)
                    .tag(item)
            }
        } index: {
            DotsIndexView(currentIndex: selection)
        }
        

Stacked Variant

By default, PageView uses a ZStack to place its index view on top of its content.

Unfortunately this seems to cause some issues that prevent the index view from detecting taps/clicks.

As a workaround, there is also a VStackPageView variant, which stacks the index view below the content.

This variant has no problems detecting taps, and is a better choice if you want the index view at the bottom of the content.

Package Metadata

Repository: elegantchaos/pageview

Default branch: main

README: README.md