Swift package to easily add an ImageSlider to compare two images in your SwiftUI projects
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-08-04.at.15.26.12.1080p.mov
import ImageSlider
struct ContentView: View {
let lhs: UIImage = 'PATH TO YOUR UIIMAGE'
let rhs: UIImage = 'PATH TO YOUR UIIMAGE'
var body: some View {
GeometryReader { geometryProxy in
ImageSlider(lhs: lhs, rhs: rhs)
.frame(width: geometryProxy.size.width, height: geometryProxy.size.width)
}
}
}
lhs
- The left handUIImage
to comparerhs
- The right handUIImage
to compare
- iOS 17.0+
dependencies: [
.package(url: "https://github.com/fontno/ImageSlider.git")
]
I am available to work on Swift projects.
Contact me on github to talk.