This package contains a PageView purely written in SwiftUI.
To download this package with Swift Package Manager, go in Xcode to File > Swift Packages > Add Package Dependency.... Search for PageView and choose the one from Connapptivity. Then choose the version and the target and click Finish.
To use this package via CocoaPods just add pod 'CAPageView'
to your pod file and run pod install
in your terminal.
PageView is easy to use, like any other View in basic SwiftUI. Simply write
PageView(pageCount: Int, currentIndex: Binding<Int>) {
Text("Add your pages here!")
}
By default PageView shows a page indicator at the bottom of the page view to show users on which page they are. If you prefer hiding it you can simply doing this by adding
.hideIndicator(Bool = true)
If you want to customize the indicator or change its position you can do this by adding
.indicator(position: IndicatorPosition = .bottomInBounds, current: UIColor? = nil, other: UIColor? = nil, background: Color? = nil)
This package is public, because everybody who wants to contribute should be able to do so. And we belive nothing is as powerful as community development. So, feel free to fork and add your code to this package.