{"id":18015996,"url":"https://github.com/linusling/lnsimagepicker","last_synced_at":"2025-07-19T05:08:41.445Z","repository":{"id":86450931,"uuid":"292276960","full_name":"LinusLing/LNSImagePicker","owner":"LinusLing","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-22T03:32:06.000Z","size":2026,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T15:25:53.621Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LinusLing.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-02T12:29:42.000Z","updated_at":"2020-09-22T03:32:10.000Z","dependencies_parsed_at":"2023-03-07T03:45:53.585Z","dependency_job_id":null,"html_url":"https://github.com/LinusLing/LNSImagePicker","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/LinusLing/LNSImagePicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FLNSImagePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FLNSImagePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FLNSImagePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FLNSImagePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinusLing","download_url":"https://codeload.github.com/LinusLing/LNSImagePicker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinusLing%2FLNSImagePicker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265892321,"owners_count":23845009,"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-10-30T04:15:48.127Z","updated_at":"2025-07-19T05:08:41.427Z","avatar_url":"https://github.com/LinusLing.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LNSImagePicker\nA WeiXin like multiple image and video picker which is compatible for iOS7+.You can use  either `ALAssetsLibrary` or `Photos framework` by setting the source of `LNSImagePickerController`.\n\n# Announcement\n\n1. This repo forks from [MTImagePicker](https://github.com/luowenxing/MTImagePicker), and thanks to [MT](https://github.com/luowenxing) for his work.\n2. Fix some bugs and add some features as shown in \u003ca href=\"#Changelog\"\u003eChangelog\u003c/a\u003e\n\n\n# Demo\n![demo](https://github.com/LinusLing/LNSImagePicker/blob/master/LNSImagePicker/Demo/demo.gif)\n\n# Requirement\n* iOS7.0+\n* Build success in Xcode 11.6 Swift 4.0\n\n# \u003ca name=\"Changelog\"\u003eChangelog\u003c/a\u003e \n\n\u003cdetails\u003e\n\u003csummary\u003e1.0.0\u003c/summary\u003e\n\u003c/br\u003e\n\u003cp\u003e1. fix UIAlertView deprecation bug\u003c/p\u003e\n\u003cp\u003e2. add selectCount feature\u003c/p\u003e\n\u003cp\u003e3. fork from MTImagePicker 3.0.2\u003c/p\u003e\n\u003c/details\u003e\n\n# Installation\n* There is no ohter dependency in `LNSImagePicker`.Recommanded Simply drag the `LNSImagePicker/LNSImagePicker` folder to your project.\n* LNSImagePicker is also available through CocoaPods. However using CocoaPod in Swift project required dynamic framework therefore iOS8.0+ is needed.To install it, simply add the following line to your Podfile:\n```\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '8.0'\nuse_frameworks!\npod 'LNSImagePicker', '~\u003e 1.0.0'\n```\n\n# Usage\n* The LNSImagePicker is similiar to `UIImagePickerController`.It's easy to use the image picker following the sample code in demo like below\n```\nlet imagePicker = LNSImagePickerController.instance\nimagePicker.mediaTypes = [LNSImagePickerMediaType.Photo,LNSImagePickerMediaType.Video]\nimagePicker.imagePickerDelegate = self\nimagePicker.maxCount = 10 // max select count\nimagePicker.defaultShowCameraRoll = true // when set to true would show Camera Roll Album like WeChat by default. \n```\n* You can use  either `ALAssetsLibrary` or `Photos framework` by setting the source of `LNSImagePickerController`\n```\n//default is LNSImagePickerSource.ALAsset\nimagePicker.source = LNSImagePickerSource.ALAsset\n//imagePicker.source = LNSImagePickerSource.Photos (Work on iOS8+)\n```\n* Call `presentViewController` \n```\nself.presentViewController(imagePicker, animated: true, completion: nil)\n```\n* Implement the delegate method accordding to the `source`.\n```\n@objc protocol LNSImagePickerControllerDelegate:NSObjectProtocol {\n\n    // Implement it when setting source to LNSImagePickerSource.ALAsset\n    optional func imagePickerController(picker:LNSImagePickerController, didFinishPickingWithAssetsModels models:[LNSImagePickerAssetsModel])\n    \n    // Implement it when setting source to LNSImagePickerSource.Photos\n    @available(iOS 8.0, *)\n    optional func imagePickerController(picker:LNSImagePickerController, didFinishPickingWithPhotosModels models:[LNSImagePickerPhotosModel])\n    \n    optional func imagePickerControllerDidCancel(picker: LNSImagePickerController)\n}\n```\n\n# TODO\n* ~~Add Albums selecting support.~~ Done.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusling%2Flnsimagepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinusling%2Flnsimagepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinusling%2Flnsimagepicker/lists"}