{"id":15038012,"url":"https://github.com/cloxnu/convenientimagepicker","last_synced_at":"2025-04-09T23:40:40.651Z","repository":{"id":56906596,"uuid":"216326947","full_name":"cloxnu/ConvenientImagePicker","owner":"cloxnu","description":"🏞🌅🌄🎇🌇🏙🌃🌉🌁the new iOS image picker. Beautiful, delicate, and customizable.","archived":false,"fork":false,"pushed_at":"2020-02-24T09:03:47.000Z","size":37294,"stargazers_count":49,"open_issues_count":8,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T01:35:10.656Z","etag":null,"topics":["cocoapods","convenient","image-picker","imagepicker","imagepickercontroller","ios","ios-swift","photo-picker","swift","swift4","xcode"],"latest_commit_sha":null,"homepage":"https://cocoapods.org/pods/ConvenientImagePicker","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/cloxnu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://starkidstory.com/index.php/archives/54/"}},"created_at":"2019-10-20T07:57:14.000Z","updated_at":"2024-10-16T14:06:28.000Z","dependencies_parsed_at":"2022-08-20T19:50:22.552Z","dependency_job_id":null,"html_url":"https://github.com/cloxnu/ConvenientImagePicker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloxnu%2FConvenientImagePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloxnu%2FConvenientImagePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloxnu%2FConvenientImagePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloxnu%2FConvenientImagePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloxnu","download_url":"https://codeload.github.com/cloxnu/ConvenientImagePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131466,"owners_count":21052819,"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":["cocoapods","convenient","image-picker","imagepicker","imagepickercontroller","ios","ios-swift","photo-picker","swift","swift4","xcode"],"created_at":"2024-09-24T20:36:48.328Z","updated_at":"2025-04-09T23:40:40.626Z","avatar_url":"https://github.com/cloxnu.png","language":"Swift","funding_links":["https://starkidstory.com/index.php/archives/54/"],"categories":[],"sub_categories":[],"readme":"![Header](Documentation/ConvenientHeader.png)\n\n![ConvenientImagePicker](Documentation/picture.png)\n\n# ConvenientImagePicker\n**ConvenientImagePicker** is a beautiful and simple image picker solution for iOS development written on Swift. It's a view controller that can simply present it everywhere. Excellent interaction, Mutiple selection, Photo picker, Dark mode, and so on.\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://starkidstory.com\"\u003e\u003cimg src=\"Documentation/starkidstorylogo_badge.png\" height=20\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/CLOXnu/ConvenientImagePicker\"\u003e\u003cimg src=\"Documentation/convenientlogo_badge.png\" height=20/\u003e\u003c/a\u003e\n\u003cbr/\u003e\n\u003ca href=\"https://cocoapods.org/pods/ConvenientImagePicker\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/v/ConvenientImagePicker.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org/pods/ConvenientImagePicker\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/l/ConvenientImagePicker.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org/pods/ConvenientImagePicker\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/p/ConvenientImagePicker.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/Xcode-9.0%2B-blue.svg\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/iOS-8.0%2B-blue.svg\"/\u003e\n\u003cimg src=\"https://img.shields.io/badge/Swift-4.0%2B-orange.svg\"/\u003e\n\u003ca href=\"https://github.com/CLOXnu/ConvenientImagePicker/blob/master/README.zh-cn.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/%E4%B8%AD%E6%96%87-README-blue.svg?style=flat\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Release Notes\n\nthe newest version is 0.2.2, Add `assetsSortKey` and `assetsSortAscending` property, the order of pictures is now customizable! thanks for @Édouard. More information see [Release Notes](ReleaseNotes.md).\n\n## Overview\n\n**ConvenientImagePicker** provides smooth interaction, has excellent user experience, it can display system photo album and can also display the specified images.\n\nIt is worth emphasizing that the **ConvenientImagePicker** view has precise gesture control.\n\n![Overview](Documentation/overview.GIF)![Detailview](Documentation/detailview.GIF)\n\n## Requirements\n\n- iOS 9.3+\n- Xcode 9.0+\n- Swift 4.0+\n\n## Installation\n\n**ConvenientImagePicker** can be installed through [CocoaPods](http://cocoapods.org), add the following entry to your Podfile:\n\n```ruby\npod 'ConvenientImagePicker'\n```\n\nThen run ```pod install```,\n\nand include the image picker wherever you need it with\n\n```swift\nimport ConvenientImagePicker\n```\n\n, it's really a simple way.\n\n## Usage\n\nWhen you prepare to present this image picker, we assume that you will call a function like this:\n\n```swift\nfunc PresentPhotoPicker()\n```\n\nWell, the most simplest version is add the following code in this function:\n\n```swift\nlet pickerViewController = PickerViewController()\npickerViewController.delegate = self\npickerViewController.isSupportLandscape = true // A Boolean value that determines whether the ability of landscape exists.\nself.present(pickerViewController, animated: true, completion: nil)\n```\n\nThen, you are supposed to implement ```ConvenientImagePickerDelegate``` in your own view controller:\n\nAnd implement these delegate function:\n\n```swift\nfunc imagePickerDidCancel(_ selectedImages: [Int : UIImage])\nfunc imageDidSelect(_ imagePicker: PickerViewController, index: Int, image: UIImage?)\nfunc imageDidDeselect(_ imagePicker: PickerViewController, index: Int, image: UIImage?)\nfunc imageSelectMax(_ imagePicker: PickerViewController, wantToSelectIndex: Int, wantToSelectImage: UIImage?)\n```\n\n```imagePickerDidCancel``` will inform you that user has cancelled the image picker, and return the images user has selected.\n\n```imageDidSelect``` will inform you that user has selected an image.\n\n```imageDidDeselect``` will inform you that user has deselected an image.\n\n```imageSelectMax``` will inform you that user want to select an image, but this time he has selected the limit number of images.\n\n---\n\nYou can use ```imagePicker.selectedImageCount``` in last 3 functions to get the number of the images user has selected.\n\nDo not initialize ```pickerViewController``` outside of function ```PresentPhotoPicker```.\n\nSo far, this is the simplest usage of this pod.\n\n## Optional Configuration\n\nSure, You can use more features of the image picker, or even customize it, instead of just using the default configuration.\n\nStart with ```let pickerViewController = PickerViewController()``` :\n\n```swift\npickerViewController.maxNumberOfSelectedImage = 50 // The maximum number of pictures allowed.\npickerViewController.allowMultipleSelection = true // A Boolean value that determines whether the picker view can mutiple selection.\npickerViewController.numberOfPictureInRow = 4 // The number of pictures in a row.\npickerViewController.intervalOfPictures = 5.0 // The interval between pictures.\npickerViewController.isSimpleMode = true // A Boolean value that determines whether the title label, count view, and close button exist.\npickerViewController.images = nil // The displayed images, it's will be photo library if nil.\npickerViewController.isDarkMode = false // A Boolean value that determines whether darkmode enable.\npickerViewController.isSwitchDarkAutomately = true // A Boolean value that determines whether darkmode can switched automately. (only iOS 13 valid)\npickerViewController.initialSelectedIndex = [0,1,2,3,4] // A set of index of selected image when the picker appears.\npickerViewController.isAnimated = true // A Boolean value that determines whether the appear animation exists.\npickerViewController.customSelectedImage // A selectedImage type value that relates to the image of selected picture.\npickerViewController.isSupportLandscape = true // A Boolean value that determines whether the ability of landscape exists.\npickerViewController.assetsSortKey = \"modificationDate\" // A String value that determines whether the order key of all assets.\npickerViewController.assetsSortAscending = false // A Boolean value that determines whether the order way of all assets.\n```\n\n### when 'isSimpleMode = false'\n\n\u003cimg src=\"https://github.com/CLOXnu/ConvenientImagePicker/blob/master/Documentation/simpleMode=false.png\" alt=\"simpleMode=false\" align=\"right\" width=\"200\"/\u003e\n\nWhen ```pickerViewController.isSimpleMode = false``` appear in your configure list, you are supposed to learn about ```titleView```, ```titleLabel```, ```countLabel```, ```doneButton```, and ```titleViewEffectView```.(As shown on the right)\n\nYou can customize ```titleView```, ```titleLabel```, ```countLabel```, and ```doneButton``` when ```isSimpleMode = false```.\n\nYou can also customize ```titleViewEffectView```, ```mainView```, and ```collectionView``` regardless of the value of ```isSimpleMode```, because they are always exist.\n\nBy the way, ```decorationBar``` can be customized in the case of ```isSimpleMode = true```.\n\nIf more in-controller-override needed, ```extension PickerViewController``` is necessary.\n\n## ⚠️Notice\n\n* Do not forget to add ```NSPhotoLibraryUsageDescription``` in your Info.plist if you want to present a photo picker.\n* Check read album permissions before using photo picker.\n* Please initialize new variable ```pickerViewController``` whenever preparing to present the image picker.\n\n## Instance\n\nIn [TextCard](https://apps.apple.com/cn/app/%E6%96%87%E5%AD%97%E5%8D%A1%E7%89%87/id1473078157), which is an iOS App has imported **ConvenientImagePicker**.\n\n\u003cimg src=\"Documentation/TextBoxIconNew.png\" alt=\"TextBoxIconNew\" width=\"100\"/\u003e\n\n\u003cimg src=\"Documentation/instance.jpg\" alt=\"instance\" width=\"300\"/\u003e\n\n\n## License\n\n**ConvenientImagePicker** is released under the MIT license. See [LICENSE](LICENSE.md) for details.\n\nThank you for your support!🙏\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloxnu%2Fconvenientimagepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloxnu%2Fconvenientimagepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloxnu%2Fconvenientimagepicker/lists"}