DotPager is an image paging library made with SwiftUI
struct ContentView: View {
let images: [Image]
var body: some View {
GeometryReader { geometry in
DotPager(
self.images,
contentWidth: geometry.size.width,
contentHeight: 300.0,
contentMode: .fill,
thresholdType: .harf) { image in
image
}
}
}
}
DotPager
is available via Swift Package Manager.
Using Xcode 11, go to File -> Swift Packages -> Add Package Dependency
and enter https://github.com/yotsu12/DotPager