{"id":1493,"url":"https://github.com/lbrndnr/ImagePickerSheetController","last_synced_at":"2025-08-02T04:31:48.058Z","repository":{"id":20555395,"uuid":"23835298","full_name":"lbrndnr/ImagePickerSheetController","owner":"lbrndnr","description":"ImagePickerSheetController replicates the custom photo action sheet in iMessage.","archived":false,"fork":false,"pushed_at":"2019-08-23T19:53:31.000Z","size":18128,"stargazers_count":1445,"open_issues_count":1,"forks_count":211,"subscribers_count":35,"default_branch":"master","last_synced_at":"2025-07-04T16:59:09.249Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://laurinbrandner.ch","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/lbrndnr.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-09-09T13:48:57.000Z","updated_at":"2025-06-30T20:30:32.000Z","dependencies_parsed_at":"2022-07-31T12:08:04.219Z","dependency_job_id":null,"html_url":"https://github.com/lbrndnr/ImagePickerSheetController","commit_stats":null,"previous_names":["larcus94/imagepickersheetcontroller"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/lbrndnr/ImagePickerSheetController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FImagePickerSheetController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FImagePickerSheetController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FImagePickerSheetController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FImagePickerSheetController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lbrndnr","download_url":"https://codeload.github.com/lbrndnr/ImagePickerSheetController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lbrndnr%2FImagePickerSheetController/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334613,"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.743Z","updated_at":"2025-08-02T04:31:46.098Z","avatar_url":"https://github.com/lbrndnr.png","language":"Swift","funding_links":[],"categories":["Media","Swift","UI"],"sub_categories":["Image","Other free courses"],"readme":"# ImagePickerSheetController\n\n[![Twitter: @lbrndnr](https://img.shields.io/badge/contact-@lbrndnr-blue.svg?style=flat)](https://twitter.com/lbrndnr)\n[![License](http://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/lbrndnr/ImagePickerSheetController/blob/master/LICENSE)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n\n## About\nImagePickerSheetController is a component that replicates the custom photo action sheet in iMessage. It's very similar to UIAlertController which makes its usage simple and concise.\n⚠️You can also find an iOS 10 version of this library [here](https://github.com/lbrndnr/ImagePickerTrayController)⚠️\n\n![Screenshot](https://raw.githubusercontent.com/lbrndnr/ImagePickerSheetController/master/Screenshots/GoT.gif)\n\n## Usage\n`ImagePickerSheetController` is similar to `UIAlertController` in its usage.\n\n### Example\n\n```swift\nlet controller = ImagePickerSheetController(mediaType: .ImageAndVideo)\ncontroller.addAction(ImagePickerAction(title: NSLocalizedString(\"Take Photo Or Video\", comment: \"Action Title\"), secondaryTitle: NSLocalizedString(\"Add comment\", comment: \"Action Title\"), handler: { _ in\n\tpresentImagePickerController(.Camera)\n}, secondaryHandler: { _, numberOfPhotos in\n\tprintln(\"Comment \\(numberOfPhotos) photos\")\n}))\ncontroller.addAction(ImagePickerAction(title: NSLocalizedString(\"Photo Library\", comment: \"Action Title\"), secondaryTitle: { NSString.localizedStringWithFormat(NSLocalizedString(\"ImagePickerSheet.button1.Send %lu Photo\", comment: \"Action Title\"), $0) as String}, handler: { _ in\n\tpresentImagePickerController(.PhotoLibrary)\n}, secondaryHandler: { _, numberOfPhotos in\n\tprintln(\"Send \\(controller.selectedImageAssets)\")\n}))\ncontroller.addAction(ImagePickerAction(title: NSLocalizedString(\"Cancel\", comment: \"Action Title\"), style: .Cancel, handler: { _ in\n\tprintln(\"Cancelled\")\n}))\n            \npresentViewController(controller, animated: true, completion: nil)\n```\nIt's recommended to use [stringsdict](https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/StringsdictFileFormat/StringsdictFileFormat.html) to easily translate plural forms in any language.\n\n## Installation\n\n### CocoaPods\n```ruby\npod \"ImagePickerSheetController\", \"~\u003e 0.9.1\"\n```\n\n###Carthage\n```objc\ngithub \"lbrndnr/ImagePickerSheetController\" ~\u003e 0.9.1\n```\n\nYou should also add two new values to your app's `Info.plist` to tell the user why you need to access the Camera and Photo Library.\n```\n\u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n\u003cstring\u003eCamera usage description\u003c/string\u003e\n\u003ckey\u003eNSPhotoLibraryUsageDescription\u003c/key\u003e\n\u003cstring\u003ePhoto Library usage description\u003c/string\u003e\n```\n\n## Requirements\nImagePickerSheetController is written in Swift and links against `Photos.framework`. It therefore requires iOS 9.0 or later.\n\n## Author\nI'm Laurin Brandner, I'm on [Twitter](https://twitter.com/lbrndnr).\n\n## License\nImagePickerSheetController is licensed under the [MIT License](http://opensource.org/licenses/mit-license.php).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbrndnr%2FImagePickerSheetController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flbrndnr%2FImagePickerSheetController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flbrndnr%2FImagePickerSheetController/lists"}