{"id":1495,"url":"https://github.com/zvonicek/ImageSlideshow","last_synced_at":"2025-08-02T04:31:18.090Z","repository":{"id":42350317,"uuid":"41762101","full_name":"zvonicek/ImageSlideshow","owner":"zvonicek","description":"Swift image slideshow with circular scrolling, timer and full screen viewer","archived":false,"fork":false,"pushed_at":"2024-08-14T15:34:32.000Z","size":1382,"stargazers_count":1798,"open_issues_count":75,"forks_count":494,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-07-22T14:02:22.585Z","etag":null,"topics":["gallery","image","ios","slideshow","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zvonicek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-01T20:38:29.000Z","updated_at":"2025-07-18T12:49:16.000Z","dependencies_parsed_at":"2022-09-12T10:21:18.325Z","dependency_job_id":"94ba48fc-c898-4d2a-a838-52ea6bf2dfe5","html_url":"https://github.com/zvonicek/ImageSlideshow","commit_stats":{"total_commits":353,"total_committers":33,"mean_commits":"10.696969696969697","dds":0.2804532577903682,"last_synced_commit":"9a5900104a2c9a5bde32dabb35b07da30ee7bc0e"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/zvonicek/ImageSlideshow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvonicek%2FImageSlideshow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvonicek%2FImageSlideshow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvonicek%2FImageSlideshow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvonicek%2FImageSlideshow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zvonicek","download_url":"https://codeload.github.com/zvonicek/ImageSlideshow/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zvonicek%2FImageSlideshow/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267941337,"owners_count":24169535,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gallery","image","ios","slideshow","swift"],"created_at":"2024-01-05T20:15:47.788Z","updated_at":"2025-08-02T04:31:17.764Z","avatar_url":"https://github.com/zvonicek.png","language":"Swift","readme":"# 🖼 ImageSlideshow\n\n**Customizable Swift image slideshow with circular scrolling, timer and full screen viewer**\n\n[![Build Status](https://www.bitrise.io/app/9aaf3e552f3a575c.svg?token=AjiVckTN9ItQtJs873mYMw\u0026branch=master)](https://www.bitrise.io/app/9aaf3e552f3a575c)\n[![Version](https://img.shields.io/cocoapods/v/ImageSlideshow.svg?style=flat)](http://cocoapods.org/pods/ImageSlideshow)\n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![License](https://img.shields.io/cocoapods/l/ImageSlideshow.svg?style=flat)](http://cocoapods.org/pods/ImageSlideshow)\n[![Platform](https://img.shields.io/cocoapods/p/ImageSlideshow.svg?style=flat)](http://cocoapods.org/pods/ImageSlideshow)\n\n\n\n![](https://dzwonsemrish7.cloudfront.net/items/2R06283n040V3P3p0i42/ezgif.com-optimize.gif)\n\n## 📱 Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## 🔧 Installation\n\n### CocoaPods\nImageSlideshow is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'ImageSlideshow', '~\u003e 1.9.0'\n```\n\n### Carthage\nTo integrate ImageSlideshow into your Xcode project using Carthage, specify it in your Cartfile:\n\n```ruby\ngithub \"zvonicek/ImageSlideshow\" ~\u003e 1.9.0\n```\n\nCarthage 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.\n\n### Manually\nOne possibility is to download a built framework (ImageSlideshow.framework.zip) from [releases page](https://github.com/zvonicek/ImageSlideshow/releases/) and link it with your project (under`Linked 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.\n\nAlternatively 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.\n\n**Note on Swift 2.3, Swift 3 and Swift 4 support**\n\nVersion 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*.\n\n\n## 🔨 How to use\n\nAdd ImageSlideshow view to your view hiearchy either in Interface Builder or in code.\n\n### Loading images\n\nSet images by using ```setImageInputs``` method on ```ImageSlideshow``` instance with an array of *InputSource*s. By default you can use ```ImageSource``` which takes ```UIImage``` or few other *InputSource*s for most popular networking libraries. You can also create your own input source by implementing ```InputSource``` protocol.\n\n| Library                                                       | InputSource name | Pod                               |\n| ------------------------------------------------------------- |:----------------:| ---------------------------------:|\n| [AlamofireImage](https://github.com/Alamofire/AlamofireImage) | AlamofireSource  | `pod \"ImageSlideshow/Alamofire\"`  |\n| [AFNetworking](https://github.com/AFNetworking/AFNetworking)  | AFURLSource      | `pod \"ImageSlideshow/AFURL\"`      |\n| [SDWebImage](https://github.com/rs/SDWebImage)                | SDWebImageSource | `pod \"ImageSlideshow/SDWebImage\"` |\n| [Kingfisher](https://github.com/onevcat/Kingfisher)           | KingfisherSource | `pod \"ImageSlideshow/Kingfisher\"` |\n| [Parse](https://github.com/ParsePlatform/Parse-SDK-iOS-OSX)   | ParseSource      | `pod \"ImageSlideshow/Parse\"`      |\n\n\n```swift\nslideshow.setImageInputs([\n  ImageSource(image: UIImage(named: \"myImage\"))!,\n  ImageSource(image: UIImage(named: \"myImage2\"))!,\n  AlamofireSource(urlString: \"https://images.unsplash.com/photo-1432679963831-2dab49187847?w=1080\"),\n  KingfisherSource(urlString: \"https://images.unsplash.com/photo-1432679963831-2dab49187847?w=1080\"),\n  ParseSource(file: PFFile(name:\"image.jpg\", data:data))\n])\n```\n\n### Configuration\n\nBehaviour is configurable by those properties:\n\n- ```slideshowInterval``` - slideshow interval in seconds (default `0` – disabled)\n- ```zoomEnabled``` - enables zooming (default `false`)\n- ```circular``` - enables circular scrolling (default `true`)\n- ```activityIndicator``` – allows to set custom activity indicator, see *Activity indicator* section\n- ```pageIndicator``` – allows to set custom page indicator, see *Page indicator* section; assign `nil` to hide page indicator\n- ```pageIndicatorPosition``` - configures position of the page indicator\n- ```contentScaleMode``` - configures the scaling (default `ScaleAspectFit`)\n- ```draggingEnabled``` - enables dragging (default `true`)\n- ```currentPageChanged``` - closure called on page change\n- ```willBeginDragging``` - closure called on scrollViewWillBeginDragging\n- ```didEndDecelerating``` - closure called on scrollViewDidEndDecelerating\n- ```preload``` - image preloading configuration (default `all` preloading, also `fixed`)\n\n### Page Indicator\n\nPage indicator can be customized using the `pageIndicator` property on ImageSlideshow. By defualt, a plain UIPageControl is used. If needed, page control can be customized:\n\n```swift\nlet pageIndicator = UIPageControl()\npageIndicator.currentPageIndicatorTintColor = UIColor.lightGray\npageIndicator.pageIndicatorTintColor = UIColor.black\nslideshow.pageIndicator = pageIndicator\n```\n\nAlso, a simple label page indicator that shows pages in style \"5/21\" (fifth page from twenty one) is provided:\n\n```swift\nslideshow.pageIndicator = LabelPageIndicator()\n```\n\nYou can also use your own page indicator by adopting the `PageIndicatorView` protocol.\n\nPosition 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.\n\n**Horizontal** positioning options are: `.left(padding: Int)`, `.center`, `.right(padding: Int)`\n\n**Vertical** positioning options are: `.top`, `.bottom`, `.under`, `customTop(padding: Int)`, `customBottom(padding: Int)`, `customUnder(padding: Int)`\n\nExample:\n```swift\nslideshow.pageIndicatorPosition = PageIndicatorPosition(horizontal: .left(padding: 20), vertical: .bottom)\n```\n\n\n### Activity Indicator\n\nBy default activity indicator is not shown, but you can enable it by setting `DefaultActivityIndicator` instance to Image Slideshow:\n\n```swift\nslideshow.activityIndicator = DefaultActivityIndicator()\n```\n\nYou can customize style and color of the indicator:\n\n```swift\nslideshow.activityIndicator = DefaultActivityIndicator(style: .white, color: nil)\n```\n\nThere'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.\n\n### Full Screen view\n\nThere is also a possibility to open full-screen image view using attached `FullScreenSlideshowViewController`. The simplest way is to call:\n\n```swift\noverride func viewDidLoad() {\n  let gestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(ViewController.didTap))\n  slideshow.addGestureRecognizer(gestureRecognizer)\n}\n\nfunc didTap() {\n  slideshow.presentFullScreenController(from: self)\n}\n```\n\n`FullScreenSlideshowViewController` can also be instantiated and configured manually if more advanced behavior is needed.\n\n## 👤 Author\n\nPetr Zvoníček\n\n## 📄 License\n\nImageSlideshow is available under the MIT license. See the LICENSE file for more info.\n\n## 👀 References\n\nInspired by projects:\n- https://github.com/gonzalezreal/Vertigo\n- https://github.com/kimar/KIImagePager\n","funding_links":[],"categories":["Media","UI","Swift"],"sub_categories":["Image","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzvonicek%2FImageSlideshow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzvonicek%2FImageSlideshow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzvonicek%2FImageSlideshow/lists"}