{"id":18389293,"url":"https://github.com/rightpoint/rigimagegallery","last_synced_at":"2025-04-07T02:34:13.071Z","repository":{"id":62451989,"uuid":"51467088","full_name":"Rightpoint/RIGImageGallery","owner":"Rightpoint","description":"An image gallery view controller designed to work with the Raizlabs Interface Guidelines for iOS","archived":false,"fork":false,"pushed_at":"2021-10-28T10:45:12.000Z","size":16205,"stargazers_count":40,"open_issues_count":9,"forks_count":19,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-04-06T13:17:04.362Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rightpoint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-10T19:44:38.000Z","updated_at":"2023-04-17T07:32:54.000Z","dependencies_parsed_at":"2022-11-01T23:46:24.675Z","dependency_job_id":null,"html_url":"https://github.com/Rightpoint/RIGImageGallery","commit_stats":null,"previous_names":["raizlabs/rigimagegallery"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FRIGImageGallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FRIGImageGallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FRIGImageGallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rightpoint%2FRIGImageGallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rightpoint","download_url":"https://codeload.github.com/Rightpoint/RIGImageGallery/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247583250,"owners_count":20961997,"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","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-11-06T01:42:26.755Z","updated_at":"2025-04-07T02:34:08.062Z","avatar_url":"https://github.com/Rightpoint.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RIGImageGallery\n\u003e An image gallery for iOS\n\n[![Build Status](https://travis-ci.org/Raizlabs/RIGImageGallery.svg?branch=develop)](https://travis-ci.org/Raizlabs/RIGImageGallery)\n[![Version](https://img.shields.io/cocoapods/v/RIGImageGallery.svg?style=flat)](http://cocoapods.org/pods/RIGImageGallery)\n[![License](https://img.shields.io/cocoapods/l/RIGImageGallery.svg?style=flat)](http://cocoapods.org/pods/RIGImageGallery)\n[![Platform](https://img.shields.io/cocoapods/p/RIGImageGallery.svg?style=flat)](http://cocoapods.org/pods/RIGImageGallery)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\nRIGImageGallery is a photo gallery meant to provide most of the functionality of the image gallery in the system Photos app, and handle asynchronous loading of images.\n\nThis library is part of the Raizlabs Interface Guidelines, which are  UI components that offer sensible defaults to help a project get off the ground quickly with components that feel native to the platform, and with easy to use customization options.\n\n![RIGImageGallery](Resources/rig_demo.gif)\n\n## Features\n\n- [x] Swipe to advance\n- [x] Pinch to zoom\n- [x] Double tap to toggle 1:1 zoom\n- [x] Single tap to hide the nav bar\n\n## Requirements\n\n- iOS 9.0+\n- Xcode 8.0+\n\n## Installation with CocoaPods\n\n#### CocoaPods\nRIGImageGallery is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\npod 'RIGImageGallery'\n```\n\n#### Carthage\nCreate a `Cartfile` that lists the framework and run `carthage update`. Follow the [instructions](https://github.com/Carthage/Carthage#if-youre-building-for-ios) to add `$(SRCROOT)/Carthage/Build/iOS/RIGImageGallery.framework` to an iOS project.\n\n```ogdl\ngithub \"Raizlabs/RIGImageGallery\"\n```\n\n#### Manually\n1. Download all of the `.swift` files in `RIGImageGallery/` and drop them into your project.  \n2. Congratulations!  \n\n## Usage example\n\nTo see a complete example of using the gallery, take a look at the [sample project](https://github.com/Raizlabs/RIGImageGallery/blob/develop/RIGImageGalleryDemo/View%20Controller/ViewController.swift).\n\n### Creating a Gallery from Image URLs\n\n```swift\nfunc createPhotoGallery() -\u003e RIGImageGalleryViewController {\n\n    let urls: [URL] = [\n          \"https://placehold.it/1920x1080\",\n          \"https://placehold.it/1080x1920\",\n          \"https://placehold.it/350x150\",\n          \"https://placehold.it/150x350\",\n        ].flatMap(URL.init(string:))\n\n    let rigItems: [RIGImageGalleryItem] = urls.map { _ in\n        RIGImageGalleryItem(placeholderImage: UIImage(named: \"placeholder\") ?? UIImage(),\n                            isLoading: true)\n    }\n\n    let rigController = RIGImageGalleryViewController(images: rigItems)\n\n    for (index, URL) in urls.enumerated() {\n        let request = imageSession.dataTask(with: URLRequest(url: URL)) { [weak rigController] data, _, error in\n            if let image = data.flatMap(UIImage.init), error == nil {\n                rigController?.images[index].image = image\n                rigController?.images[index].isLoading = false\n            }\n        }\n        request.resume()\n    }\n\n    return rigController\n}\n```\n\n### Presenting and Customizing the View Controller\n```swift\n@objc func showGallery(_ sender: UIButton) {\n    let photoViewController = createPhotoGallery()\n    photoViewController.dismissHandler = dismissPhotoViewer\n    photoViewController.actionButtonHandler = actionButtonHandler\n    photoViewController.actionButton = UIBarButtonItem(barButtonSystemItem: .action, target: nil, action: nil)\n    photoViewController.traitCollectionChangeHandler = traitCollectionChangeHandler\n    photoViewController.countUpdateHandler = updateCount\n    let navigationController = UINavigationController(rootViewController: photoViewController)\n    present(navigationController, animated: true, completion: nil)\n}\n\nfunc dismissPhotoViewer(_ :RIGImageGalleryViewController) {\n    dismiss(animated: true, completion: nil)\n}\n\nfunc actionButtonHandler(_: RIGImageGalleryViewController, galleryItem: RIGImageGalleryItem) {\n}\n\nfunc updateCount(_ gallery: RIGImageGalleryViewController, position: Int, total: Int) {\n    gallery.countLabel.text = \"\\(position + 1) of \\(total)\"\n}\n\nfunc traitCollectionChangeHandler(_ photoView: RIGImageGalleryViewController) {\n    let isPhone = UITraitCollection(userInterfaceIdiom: .phone)\n    let isCompact = UITraitCollection(verticalSizeClass: .compact)\n    let allTraits = UITraitCollection(traitsFrom: [isPhone, isCompact])\n    photoView.doneButton = photoView.traitCollection.containsTraits(in: allTraits) ? nil : UIBarButtonItem(barButtonSystemItem: .done, target: nil, action: nil)\n}\n```\n\n## Contributing\n\nIssues and pull requests are welcome! Please ensure that you have the latest [SwiftLint](https://github.com/realm/SwiftLint) installed before committing and that there are no style warnings generated when building.\n\nContributors are expected to abide by the [Contributor Covenant Code of Conduct](https://github.com/Raizlabs/RIGImageGallery/blob/develop/CONTRIBUTING.md).\n\n## License\n\nRIGImageGallery is available under the MIT license. See the LICENSE file for more info.\n\n## Author\n\nMichael Skiba, \u003cmailto:mike.skiba@raizlabs.com\u003e [@atelierclkwrk](https://twitter.com/atelierclkwrk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Frigimagegallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frightpoint%2Frigimagegallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frightpoint%2Frigimagegallery/lists"}