HorizontalPageControl
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
iOS 17.0, Swift 5
Installation
HorizontalPageControl is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'HorizontalPageControl'
Usage
var body: some View {
let config = ...
HorizontalPageControl(config: ...) {
// implement your views here
}
.onPageChanged { oldValue, newValue in
print("oldValue:\(oldValue), newValue:\(newValue)")
}
.onIndicatorTouched { scrollViewProxy, index in
print("you can scroll to specific page programmatically via scrollViewProxy:\(scrollViewProxy), index:\(index)")
}
}
Author
License
HorizontalPageControl is available under the MIT license. See the LICENSE file for more info.