Swiftpack.co - Connapptivity/SwiftUI-PageView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Connapptivity.
Connapptivity/SwiftUI-PageView 1.1.1
This package contains a SwiftUI PageView.
⭐️ 6
🕓 3 years ago
iOS
.package(url: "https://github.com/Connapptivity/SwiftUI-PageView.git", from: "1.1.1")

PageView

This package contains a PageView purely written in SwiftUI.

The page view in action

Getting Started

Swift Package Manager

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.

CocoaPods

To use this package via CocoaPods just add pod 'CAPageView' to your pod file and run pod install in your terminal.

Usage

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!")
    
}

Indicator

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)

Contribute

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.

GitHub

link
Stars: 6
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Initial Release
3 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics