Introduction
Welcome to SimpleImageViewer!
SimpleImageViewer is a lightweight, open-source library for displaying images in a user-friendly and customizable way. With SimpleImageViewer, you can easily add image viewing functionality to your iOS app.
Features
- Display images with pinch-to-zoom and double-tap gestures
- Support for both local and remote images
- Swipe to dismiss images
- Customizable UI elements
- Support for landscape and portrait orientations
Installation
To install SimpleImageViewer, you can use CocoaPods. Simply add the following line to your Podfile:
pod 'SimpleImageViewer', '~> 1.0.0'
Then, run the command pod install
in your terminal.
Usage
To use SimpleImageViewer in your project, follow these steps:
- Add the import statement to the file where you want to use SimpleImageViewer:
import SimpleImageViewer
- Create an instance of SimpleImageViewerController:
let imageViewer = SimpleImageViewerController()
- Set the images you want to display:
imageViewer.images = ["image1.jpg", "image2.jpg", "image3.jpg"]
- Present the SimpleImageViewerController:
present(imageViewer, animated: true, completion: nil)
Customization
You can customize the appearance and behavior of SimpleImageViewer by using the various properties available. Here are a few examples:
- Change the background color:
imageViewer.backgroundColor = .black
- Hide the close button:
imageViewer.showCloseButton = false
- Change the close button image:
imageViewer.closeButtonImage = UIImage(named: "custom_close_button")
More Information
For more information on how to use SimpleImageViewer and its available options, please refer to the official documentation on GitHub.