SlideshowGallery is a customizable Swift library for creating a product image slideshow. It features paginated scrolling, an automatic timer, and a full-screen image viewer, making it ideal for e-commerce and product showcase applications.
- Paginated Scrolling: Seamlessly swipe through images with pagination indicators.
- Timer-Based Sliding: Automatically transition between images at customizable intervals.
- Full-Screen Viewer: Tap on any image to view it in a full-screen interactive mode.
- Customizable UI: Tailor the look and feel to match your app's design.
- Lightweight: Minimal dependencies for easy integration.
Add the following to your Package.swift file:
import PackageDescription
let package = Package(
dependencies: [
.package(url: "https://github.com/JerwinPRO/SlideshowGallery.git", from: "0.0.1")
]
)Or integrate it directly in Xcode:
- Go to File > Add Packages.
- Enter the repository URL:
https://github.com/JerwinPRO/SlideshowGallery.git. - Select the version rule and add it to your project.
-
Import the library into your Swift file:
import SlideshowGallery -
Initialize and configure the slideshow:
let slideshow = SlideshowGallery() slideshow.images = [ UIImage(named: "image1")!, UIImage(named: "image2")!, UIImage(named: "image3")! ] slideshow.autoScrollInterval = 3.0 // Set auto-scroll every 3 seconds view.addSubview(slideshow)
-
Add constraints or frame settings to position the slideshow:
slideshow.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ slideshow.leadingAnchor.constraint(equalTo: view.leadingAnchor), slideshow.trailingAnchor.constraint(equalTo: view.trailingAnchor), slideshow.topAnchor.constraint(equalTo: view.topAnchor, constant: 100), slideshow.heightAnchor.constraint(equalToConstant: 200) ])
Enable the full-screen viewer with a tap gesture:
slideshow.enableFullScreenViewer = trueTo set up the project for development:
-
Clone the repository:
git clone https://github.com/JerwinPRO/SlideshowGallery.git cd SlideshowGallery -
Install dependencies:
make install
-
Run the test suite:
make test
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your commit message here" - Push to your branch:
git push origin feature/your-feature-name
- Create a pull request on GitHub.
Distributed under the MIT License. See LICENSE for more information.
Author: JerwinPRO
Contact: project@jerwinpastoral.com
For more information, visit the GitHub repository.