{"id":1475,"url":"https://github.com/justinvallely/SwiftPhotoGallery","last_synced_at":"2025-08-02T04:31:14.830Z","repository":{"id":62456648,"uuid":"42273429","full_name":"justinvallely/SwiftPhotoGallery","owner":"justinvallely","description":"iOS photo gallery written in Swift","archived":false,"fork":false,"pushed_at":"2025-05-09T13:31:50.000Z","size":24715,"stargazers_count":284,"open_issues_count":6,"forks_count":55,"subscribers_count":16,"default_branch":"develop","last_synced_at":"2025-06-08T19:12:28.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinvallely.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}},"created_at":"2015-09-10T22:12:20.000Z","updated_at":"2025-05-22T22:32:47.000Z","dependencies_parsed_at":"2022-11-01T23:03:19.821Z","dependency_job_id":null,"html_url":"https://github.com/justinvallely/SwiftPhotoGallery","commit_stats":null,"previous_names":["inspirato/swiftphotogallery"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/justinvallely/SwiftPhotoGallery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinvallely%2FSwiftPhotoGallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinvallely%2FSwiftPhotoGallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinvallely%2FSwiftPhotoGallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinvallely%2FSwiftPhotoGallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinvallely","download_url":"https://codeload.github.com/justinvallely/SwiftPhotoGallery/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinvallely%2FSwiftPhotoGallery/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334611,"owners_count":24233793,"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-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-01-05T20:15:47.317Z","updated_at":"2025-08-02T04:31:14.481Z","avatar_url":"https://github.com/justinvallely.png","language":"Swift","funding_links":[],"categories":["Media","Swift"],"sub_categories":["Image"],"readme":"# SwiftPhotoGallery\n\n[![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20tvOS-blue.svg?style=flat)](http://cocoapods.org/pods/SwiftPhotoGallery)\n[![Version](https://img.shields.io/cocoapods/v/SwiftPhotoGallery.svg?style=flat)](http://cocoapods.org/pods/SwiftPhotoGallery)\n[![License](https://img.shields.io/cocoapods/l/SwiftPhotoGallery.svg?style=flat)](http://cocoapods.org/pods/SwiftPhotoGallery)\n[![CocoaPods](https://img.shields.io/cocoapods/dt/SwiftPhotoGallery.svg?style=flat)](https://cocoapods.org/pods/SwiftPhotoGallery)\n![tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)\n![Swift](https://img.shields.io/badge/Swift-5.0-orange.svg)\n![Dependencies](https://img.shields.io/badge/dependencies-none-lightgrey.svg?style=flat)\n\n## Overview\n\nA full screen photo gallery for iOS and tvOS written in Swift.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://s3.amazonaws.com/inspirato-ios/SwiftPhotoGallery_animation.gif\"\u003e\n\u003c/p\u003e\n\n- Photos can be panned and zoomed (iOS only)\n- Pinch to zoom (iOS only)\n- Double tap to zoom all the way in and again to zoom all the way out (iOS only)\n- Single tap to close\n- Twitter style swipe to close (iOS only)\n- Includes a customizable page indicator\n- Support for any orientation (iOS only)\n- Supports images of varying sizes\n- Includes unit tests\n- Customize nearly all UI aspects\n- Integrates seamlessly with [SDWebImage](https://cocoapods.org/pods/SDWebImage)\n\n## Usage\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory.\n\n## Requirements\n- iOS 9.0+\n- tvOS 10.0+\n- Xcode 10.2.1+\n- Swift 5.0+\n\n## Communication\n\n- If you **need help**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/swiftphotogallery). (Tag 'swiftphotogallery')\n- If you'd like to **ask a general question**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/swiftphotogallery).\n- If you **found a bug**, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n\n## Installation\n\nSwiftPhotoGallery is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```swift\npod 'SwiftPhotoGallery'\n```\n\n## Implementation\n\n* **Import the framework in your view controller**\n```swift\nimport SwiftPhotoGallery\n```\n\n* **Create an instance**\n```swift\nlet gallery = SwiftPhotoGallery(delegate: self, dataSource: self)\n```\n\n* **Customize the look**\n```swift\ngallery.backgroundColor = UIColor.black\ngallery.pageIndicatorTintColor = UIColor.gray.withAlphaComponent(0.5)\ngallery.currentPageIndicatorTintColor = UIColor.white\ngallery.hidePageControl = false\n```\n\n* **Implement the datasource**\n```swift\nlet imageNames = [\"image1.jpeg\", \"image2.jpeg\", \"image3.jpeg\"]\n\nfunc numberOfImagesInGallery(gallery: SwiftPhotoGallery) -\u003e Int {\n    return imageNames.count\n}\n\nfunc imageInGallery(gallery: SwiftPhotoGallery, forIndex: Int) -\u003e UIImage? {\n    return UIImage(named: imageNames[forIndex])\n}\n```\n\n* **Implement the delegate**\n```swift\nfunc galleryDidTapToClose(gallery: SwiftPhotoGallery) {\n    // do something cool like:\n    dismiss(animated: true, completion: nil)\n}\n```\n\n* **Present the gallery**\n```swift\npresent(gallery, animated: true, completion: nil)\n```\n\n\n\n\n## Full Example\n```swift\nclass ViewController: UIViewController, SwiftPhotoGalleryDataSource, SwiftPhotoGalleryDelegate {\n\n    let imageNames = [\"image1.jpeg\", \"image2.jpeg\", \"image3.jpeg\"]\n    var index: Int = 2\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n\n    @IBAction func didPressShowMeButton(sender: AnyObject) {\n        let gallery = SwiftPhotoGallery(delegate: self, dataSource: self)\n\n        gallery.backgroundColor = UIColor.black\n        gallery.pageIndicatorTintColor = UIColor.gray.withAlphaComponent(0.5)\n        gallery.currentPageIndicatorTintColor = UIColor.white\n        gallery.hidePageControl = false\n\n        present(gallery, animated: true, completion: nil)\n\n        /*\n        /// Or load on a specific page like this:\n\n        present(gallery, animated: true, completion: { () -\u003e Void in\n            gallery.currentPage = self.index\n        })\n        */\n\n    }\n\n    // MARK: SwiftPhotoGalleryDataSource Methods\n\n    func numberOfImagesInGallery(gallery: SwiftPhotoGallery) -\u003e Int {\n        return imageNames.count\n    }\n\n    func imageInGallery(gallery: SwiftPhotoGallery, forIndex: Int) -\u003e UIImage? {\n        return UIImage(named: imageNames[forIndex])\n    }\n\n    // MARK: SwiftPhotoGalleryDelegate Methods\n\n    func galleryDidTapToClose(gallery: SwiftPhotoGallery) {\n        dismiss(animated: true, completion: nil)\n    }\n    \n}\n```\n\n\n## Author\n\nJustin Vallely, justinvallely@gmail.com\n\n## License\n\nSwiftPhotoGallery is available under the Apache License 2.0. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinvallely%2FSwiftPhotoGallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinvallely%2FSwiftPhotoGallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinvallely%2FSwiftPhotoGallery/lists"}