All Projects → zvonicek → Imageslideshow

zvonicek / Imageslideshow

Licence: mit
Swift image slideshow with circular scrolling, timer and full screen viewer

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to Imageslideshow

Ngx Gallery
Angular Gallery, Carousel and Lightbox
Stars: ✭ 417 (-74.13%)
Mutual labels:  slideshow, image, gallery
Kiimagepager
The KIImagePager is inspired by foursquare's ImageSlideshow, the user may scroll through images loaded from the Web
Stars: ✭ 324 (-79.9%)
Mutual labels:  slideshow, image, gallery
V Viewer
Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js
Stars: ✭ 1,776 (+10.17%)
Mutual labels:  image, gallery
Axphotoviewer
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos.
Stars: ✭ 544 (-66.25%)
Mutual labels:  slideshow, gallery
Louvre
A small customizable library useful to handle an gallery image pick action built-in your app. 🌄🌠
Stars: ✭ 629 (-60.98%)
Mutual labels:  image, gallery
Gallery Dl
Command-line program to download image galleries and collections from several image hosting sites
Stars: ✭ 4,199 (+160.48%)
Mutual labels:  image, gallery
Ptshowcaseviewcontroller
An initial implementation of a "showcase" view( controller) for iOS apps... Visualizes images, videos and PDF files beautifully! (by @pittleorg) [meta: image, photo, video, document, pdf, album, gallery, showcase, gallery, iOS, iPhone, iPad, component, library, viewer]
Stars: ✭ 395 (-75.5%)
Mutual labels:  image, gallery
React Viewer
react image viewer, supports rotation, scale, zoom and so on
Stars: ✭ 502 (-68.86%)
Mutual labels:  image, gallery
Glightbox
Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
Stars: ✭ 702 (-56.45%)
Mutual labels:  image, gallery
React Grid Carousel
React responsive carousel component w/ grid layout
Stars: ✭ 29 (-98.2%)
Mutual labels:  image, gallery
Imageviewer.swift
An easy to use Image Viewer that is inspired by Facebook
Stars: ✭ 1,071 (-33.56%)
Mutual labels:  image, gallery
Borgert Cms
Borgert is a CMS Open Source created with Laravel Framework 5.6
Stars: ✭ 298 (-81.51%)
Mutual labels:  image, gallery
Auk
An image slideshow for iOS written in Swift.
Stars: ✭ 274 (-83%)
Mutual labels:  slideshow, image
Rxgalleryfinal
图片选择库,单选/多选、拍照、裁剪、压缩,自定义。包括视频选择和录制。
Stars: ✭ 2,798 (+73.57%)
Mutual labels:  image, gallery
React Background Slideshow
Sexy tiled background slideshow for React 🔥
Stars: ✭ 98 (-93.92%)
Mutual labels:  slideshow, image
previewSlider
Responsive fullscreen image slider where the users are able to preview next/previous image when hovering over the navigation arrows.
Stars: ✭ 16 (-99.01%)
Mutual labels:  gallery, slideshow
React Slideshow
A react component for slideshow supporting slide, fade and zoom
Stars: ✭ 201 (-87.53%)
Mutual labels:  slideshow, gallery
Ffmpeg Video Slideshow Scripts
Shell scripts to create video slideshows using images and videos
Stars: ✭ 248 (-84.62%)
Mutual labels:  slideshow, image
Vue Preview
A Vue Integrated PhotoSwipe Image Preview Plugin
Stars: ✭ 639 (-60.36%)
Mutual labels:  image, gallery
Imageslideshow
A Swift Image SlideShow for iOS
Stars: ✭ 68 (-95.78%)
Mutual labels:  slideshow, image

🖼 ImageSlideshow

Customizable Swift image slideshow with circular scrolling, timer and full screen viewer

Build Status Version Carthage Compatible License Platform

📱 Example

To run the example project, clone the repo, and run pod install from the Example directory first.

🔧 Installation

CocoaPods

ImageSlideshow is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ImageSlideshow', '~> 1.9.0'

Carthage

To integrate ImageSlideshow into your Xcode project using Carthage, specify it in your Cartfile:

github "zvonicek/ImageSlideshow" ~> 1.9.0

Carthage does not include InputSources for external providers (due to dependency on those providers) so you need to grab the one you need from ImageSlideshow/Classes/InputSources manually.

Manually

One possibility is to download a built framework (ImageSlideshow.framework.zip) from releases page and link it with your project (underLinked Frameworks and Libraries in your target). This is, however, currently problematic because of rapid Swift development -- the framework is built for a single Swift version and may not work on previous/future versions.

Alternatively can also grab the whole ImageSlideshow directory and copy it to your project. Be sure to remove those external Input Sources you don't need.

Note on Swift 2.3, Swift 3 and Swift 4 support

Version 1.4 supports Swift 4. Swift 3 is supported from version 1.0, for Swift 2.2 and Swift 2.3 compatible code use version 0.6 or branch swift-2.3.

🔨 How to use

Add ImageSlideshow view to your view hiearchy either in Interface Builder or in code.

Loading images

Set images by using setImageInputs method on ImageSlideshow instance with an array of InputSources. By default you can use ImageSource which takes UIImage or few other InputSources for most popular networking libraries. You can also create your own input source by implementing InputSource protocol.

Library InputSource name Pod
AlamofireImage AlamofireSource pod "ImageSlideshow/Alamofire"
AFNetworking AFURLSource pod "ImageSlideshow/AFURL"
SDWebImage SDWebImageSource pod "ImageSlideshow/SDWebImage"
Kingfisher KingfisherSource pod "ImageSlideshow/Kingfisher"
Parse ParseSource pod "ImageSlideshow/Parse"
slideshow.setImageInputs([
  ImageSource(image: UIImage(named: "myImage"))!,
  ImageSource(image: UIImage(named: "myImage2"))!,
  AlamofireSource(urlString: "https://images.unsplash.com/photo-1432679963831-2dab49187847?w=1080"),
  KingfisherSource(urlString: "https://images.unsplash.com/photo-1432679963831-2dab49187847?w=1080"),
  ParseSource(file: PFFile(name:"image.jpg", data:data))
])

Configuration

Behaviour is configurable by those properties:

  • slideshowInterval - slideshow interval in seconds (default 0 – disabled)
  • zoomEnabled - enables zooming (default false)
  • circular - enables circular scrolling (default true)
  • activityIndicator – allows to set custom activity indicator, see Activity indicator section
  • pageIndicator – allows to set custom page indicator, see Page indicator section; assign nil to hide page indicator
  • pageIndicatorPosition - configures position of the page indicator
  • contentScaleMode - configures the scaling (default ScaleAspectFit)
  • draggingEnabled - enables dragging (default true)
  • currentPageChanged - closure called on page change
  • willBeginDragging - closure called on scrollViewWillBeginDragging
  • didEndDecelerating - closure called on scrollViewDidEndDecelerating
  • preload - image preloading configuration (default all preloading, also fixed)

Page Indicator

Page indicator can be customized using the pageIndicator property on ImageSlideshow. By defualt, a plain UIPageControl is used. If needed, page control can be customized:

let pageIndicator = UIPageControl()
pageIndicator.currentPageIndicatorTintColor = UIColor.lightGray
pageIndicator.pageIndicatorTintColor = UIColor.black
slideshow.pageIndicator = pageIndicator

Also, a simple label page indicator that shows pages in style "5/21" (fifth page from twenty one) is provided:

slideshow.pageIndicator = LabelPageIndicator()

You can also use your own page indicator by adopting the PageIndicatorView protocol.

Position of the page indicator can be configured by assigning a PageIndicatorPosition value to the pageIndicatorPosition property on ImageSlideshow. You may specify the horizontal and vertical positioning separately.

Horizontal positioning options are: .left(padding: Int), .center, .right(padding: Int)

Vertical positioning options are: .top, .bottom, .under, customTop(padding: Int), customBottom(padding: Int), customUnder(padding: Int)

Example:

slideshow.pageIndicatorPosition = PageIndicatorPosition(horizontal: .left(padding: 20), vertical: .bottom)

Activity Indicator

By default activity indicator is not shown, but you can enable it by setting DefaultActivityIndicator instance to Image Slideshow:

slideshow.activityIndicator = DefaultActivityIndicator()

You can customize style and color of the indicator:

slideshow.activityIndicator = DefaultActivityIndicator(style: .white, color: nil)

There's also an option to use your own activity indicator. You just need to implement ActivityIndicatorView and ActivityIndicatorFactory protocols. See ActivityIndicator.swift for more information.

Full Screen view

There is also a possibility to open full-screen image view using attached FullScreenSlideshowViewController. The simplest way is to call:

override func viewDidLoad() {
  let gestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(ViewController.didTap))
  slideshow.addGestureRecognizer(gestureRecognizer)
}

func didTap() {
  slideshow.presentFullScreenController(from: self)
}

FullScreenSlideshowViewController can also be instantiated and configured manually if more advanced behavior is needed.

👤 Author

Petr Zvoníček

📄 License

ImageSlideshow is available under the MIT license. See the LICENSE file for more info.

👀 References

Inspired by projects:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].