{"id":15029028,"url":"https://github.com/hyperoslo/lightbox","last_synced_at":"2025-10-20T02:57:22.966Z","repository":{"id":34381391,"uuid":"38307869","full_name":"hyperoslo/Lightbox","owner":"hyperoslo","description":":milky_way: A convenient and easy to use image viewer for your iOS app","archived":false,"fork":false,"pushed_at":"2024-08-27T11:36:10.000Z","size":6184,"stargazers_count":1730,"open_issues_count":24,"forks_count":337,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-10-17T07:04:54.967Z","etag":null,"topics":["image","ios","lightbox","presentation","swift"],"latest_commit_sha":null,"homepage":"https://www.hyper.no","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperoslo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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-06-30T12:28:01.000Z","updated_at":"2025-10-13T10:31:21.000Z","dependencies_parsed_at":"2022-08-08T01:00:17.649Z","dependency_job_id":"ce3fab13-6619-4b49-89ef-5c8d8c026e08","html_url":"https://github.com/hyperoslo/Lightbox","commit_stats":{"total_commits":498,"total_committers":37,"mean_commits":13.45945945945946,"dds":0.6465863453815262,"last_synced_commit":"398ee143f00bfc070023c155e6d088ffb399c8cb"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/hyperoslo/Lightbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2FLightbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2FLightbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2FLightbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2FLightbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperoslo","download_url":"https://codeload.github.com/hyperoslo/Lightbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperoslo%2FLightbox/sbom","scorecard":{"id":475481,"data":{"date":"2025-08-11","repo":{"name":"github.com/hyperoslo/Lightbox","commit":"c73d8292b53c8f2e08ba57286ee46d9e11599300"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":7,"reason":"Found 11/15 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 2.5.0 not signed: https://api.github.com/repos/hyperoslo/Lightbox/releases/32133930","Warn: release artifact 2.5.0 does not have provenance: https://api.github.com/repos/hyperoslo/Lightbox/releases/32133930"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T15:10:27.299Z","repository_id":34381391,"created_at":"2025-08-19T15:10:27.299Z","updated_at":"2025-08-19T15:10:27.299Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279990980,"owners_count":26255609,"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-10-20T02:00:06.978Z","response_time":62,"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":["image","ios","lightbox","presentation","swift"],"created_at":"2024-09-24T20:09:36.147Z","updated_at":"2025-10-20T02:57:22.926Z","avatar_url":"https://github.com/hyperoslo.png","language":"Swift","readme":"# Lightbox\n\n[![CI Status](https://circleci.com/gh/hyperoslo/Lightbox.png)](https://circleci.com/gh/hyperoslo/Lightbox)\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/Lightbox.svg?style=flat)](http://cocoadocs.org/docsets/Lightbox)\n[![Platform](https://img.shields.io/cocoapods/p/Lightbox.svg?style=flat)](http://cocoadocs.org/docsets/Lightbox)\n![Swift](https://img.shields.io/badge/%20in-swift%204.0-orange.svg)\n\n\u003cimg src=\"https://raw.githubusercontent.com/hyperoslo/Lightbox/master/Images/Icon.png\" alt=\"Lightbox Icon\" align=\"right\" /\u003e\n\n**Lightbox** is a convenient and easy to use image viewer for your iOS app,\npacked with all the features you expect:\n\n- [x] Paginated image slideshow.\n- [x] Video support.\n- [x] Double-tap to zoom.\n- [x] Image caption.\n- [x] Dynamic background based on [Hue](https://github.com/hyperoslo/Hue)\n- [x] Remote image loading and caching based on [Imaginary](https://github.com/hyperoslo/Imaginary)\n- [x] Interactive transition animations.\n- [x] Powerful configuration.\n- [x] [Live Demo](https://appetize.io/app/wfgwc2uvg82m9pzbt17p4rrgh4?device=iphone5s\u0026scale=75\u0026orientation=portrait\u0026osVersion=9.3)\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"Images/demo.png\" height=\"500\"\u003e\n\u003cimg src=\"Images/demo2.png\" height=\"500\"\u003e\n\u003c/div\u003e\n\n## Table of Contents\n\n* [Usage](#usage)\n  * [Controller](#controller)\n  * [Delegates](#delegates)\n  * [Image loading](#image-loading)\n  * [Video](#video)\n  * [Configuration](#configuration)\n* [Installation](#installation)\n* [Author](#author)\n* [Contributing](#contributing)\n* [License](#license)\n\n## Usage\n\n### Controller\n\nTo start your slideshow just instantiate `LightboxController`, set needed\ndelegates and present it:\n\n\n```swift\n\n// Create an array of images.\nlet images = [\n  LightboxImage(imageURL: URL(string: \"https://cdn.arstechnica.net/2011/10/05/iphone4s_sample_apple-4e8c706-intro.jpg\")!),\n  LightboxImage(\n    image: UIImage(named: \"photo1\")!,\n    text: \"This is an example of a remote image loaded from URL\"\n  ),\n  LightboxImage(\n    image: UIImage(named: \"photo2\")!,\n    text: \"\",\n    videoURL: URL(string: \"https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4\")\n  ),\n  LightboxImage(\n    image: UIImage(named: \"photo3\")!,\n    text: \"This is an example of a local image.\"\n  )\n]\n\n// Create an instance of LightboxController.\nlet controller = LightboxController(images: images)\n\n// Set delegates.\ncontroller.pageDelegate = self\ncontroller.dismissalDelegate = self\n\n// Use dynamic background.\ncontroller.dynamicBackground = true\n\n// Present your controller.\npresent(controller, animated: true, completion: nil)\n```\n\n### Delegates\n\nUse `LightboxControllerPageDelegate` if you want to be notified about page\nnavigation changes.\n\n```swift\nextension ViewController: LightboxControllerPageDelegate {\n\n  func lightboxController(_ controller: LightboxController, didMoveToPage page: Int) {\n    print(page)\n  }\n}\n```\n\nUse `LightboxControllerDismissalDelegate` to be notified when controller is\nabout to be dismissed. Please note that `LightboxController` dismisses itself\nif it was presented initially.\n\n```swift\nextension ViewController: LightboxControllerDismissalDelegate: class {\n\n  func lightboxControllerWillDismiss(_ controller: LightboxController) {\n    // ...\n  }\n}\n```\n\n### Image loading\n\nBy default images are loaded using [Imaginary](https://github.com/hyperoslo/Imaginary) for reliable loading and caching. But it's easy to change this behavior using **LightboxConfig**\n\n```swift\nLightboxConfig.loadImage = {\n  imageView, URL, completion in\n  // Custom image loading\n}\n```\n\n### Video\n\n**Lightbox** can show and plays video using default `AVPlayerViewController`. Showning video by using `videoURL`:\n\n```swift\nLightboxImage(\n  image: UIImage(named: \"photo2\")!,\n  text: \"\",\n  videoURL: NSURL(string: \"https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4\")\n)\n```\n\nOverride video handling if needed:\n\n```swift\nLightboxConfig.handleVideo = { from, videoURL in\n  // Custom video handling\n  let videoController = AVPlayerViewController()\n  videoController.player = AVPlayer(url: videoURL)\n\n  from.present(videoController, animated: true) {\n    videoController.player?.play()\n  }\n}\n```\n\n### Configuration\n\nConfigure text, colors, fonts of UI elements by overriding the static\nvariables in the **Lightbox** [configuration](https://github.com/hyperoslo/Lightbox/blob/master/Source/LightboxConfig.swift) struct. As an example:\n\n```swift\nLightboxConfig.CloseButton.image = UIImage(named: ImageList.Lightbox.closeButton)\nLightboxConfig.CloseButton.textAttributes = TextAttributes.Lightbox.closeButton\nLightboxConfig.CloseButton.text = \"Finish\"\n\nLightboxConfig.DeleteButton.image = UIImage(named: ImageList.Lightbox.deleteButton)\nLightboxConfig.DeleteButton.textAttributes = TextAttributes.Lightbox.deleteButton\nLightboxConfig.DeleteButton.text = \"Delete\"\n\nLightboxConfig.InfoLabel.ellipsisText = \"Show more\"\n```\n\n## Installation\n\n**Lightbox** is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'Lightbox'\n```\n\nIn order to quickly try the demo project of a **Lightbox** just run\n`pod try Lightbox` in your terminal.\n\n**Lightbox** is also available through [Carthage](https://github.com/Carthage/Carthage).\nTo install just write into your Cartfile:\n\n```ruby\ngithub \"hyperoslo/Lightbox\"\n```\n\nTo install **Lightbox** manually just download and drop `Sources` and\n`Images` folders in your project.\n\n## Author\n\nHyper Interaktiv AS, ios@hyper.no\n\n## Contributing\n\nWe would love you to contribute to **Lightbox**, check the [CONTRIBUTING](https://github.com/hyperoslo/Lightbox/blob/master/CONTRIBUTING.md) file for more info.\n\n## License\n\n**Lightbox** is available under the MIT license. See the [LICENSE](https://github.com/hyperoslo/Lightbox/blob/master/LICENSE.md) file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperoslo%2Flightbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperoslo%2Flightbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperoslo%2Flightbox/lists"}