A-J-Full-Screen-Image-Browser
A-J-Full-Screen-Image-Browser is an drop-in solution for full screen image and video browser.
Features
- [x] No Dependency, 100% iOS Native
- [x] Support both iPad and iPhone family
- [x] Support image resizing on different screen orientation
- [x] Support multiple videos and images
- [x] Image can be panned, zoomed and rotated
- [x] Double tap to zoom all the way in and again to zoom all the way out
- [x] Swipe to dismiss
- [x] High level diagram
- [x] MVVM architecture
- [x] Full documentation
- [x] Easy to customise
Requirements
- iOS 9.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
- Xcode 9.0+
- Swift 4.0+
Installation
- drag and drop the entire
A_J_Full_Screen_Image_Browser
into your project
Full Usage Example
AlamofireImage Support
By default,
FullScreenImageBrowser
doesn't use any 3rd library, theSingleImage
usesURLSession
to fetch image. However it's designed to be compatible with any networking library, one good example is AlamofireImage
The following code snippet shows an example how to use AlamofireImage
to seamlessly integrated with FullScreenImageBrowser
.
Folder Structure
File | Responsiblity |
---|---|
animator | customised fade in/fade out animations with damping factors |
asset | customised static image asset for the full screen image/video browser navigation bar |
core/FullScreenImageBrowser | manager class to be responsible for full screen image/video browser |
core/FullScreenImageBrowserViewModel | datasource and business logic for full screen image/video browser |
core/MediaDownloadable | protocol to define images to be able to asynchronously download |
core/MaskImageViewer | customised overlay view for full screen image/video browser |
core/SingleImageViewer | view controller to be responsible for single image rendering on the full screen |
core/ZoomableImageView | view to add support for image to zoom, pin, rotate, and animation |
Demo
HLD