{"id":27874803,"url":"https://github.com/loopeer/lpalbum","last_synced_at":"2026-03-06T10:32:29.059Z","repository":{"id":56918908,"uuid":"103389638","full_name":"loopeer/LPAlbum","owner":"loopeer","description":"an albums that can preview, multiple-choice","archived":false,"fork":false,"pushed_at":"2018-01-19T03:54:34.000Z","size":1491,"stargazers_count":17,"open_issues_count":3,"forks_count":2,"subscribers_count":10,"default_branch":"dev","last_synced_at":"2025-04-08T06:35:29.399Z","etag":null,"topics":["album","imagepick","imagepicker","ios","photo","photobrowser","photos","swift"],"latest_commit_sha":null,"homepage":"","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/loopeer.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":"2017-09-13T11:06:13.000Z","updated_at":"2024-07-07T01:47:54.000Z","dependencies_parsed_at":"2022-08-21T04:50:29.785Z","dependency_job_id":null,"html_url":"https://github.com/loopeer/LPAlbum","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopeer%2FLPAlbum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopeer%2FLPAlbum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopeer%2FLPAlbum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopeer%2FLPAlbum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopeer","download_url":"https://codeload.github.com/loopeer/LPAlbum/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252424966,"owners_count":21745835,"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":["album","imagepick","imagepicker","ios","photo","photobrowser","photos","swift"],"created_at":"2025-05-05T01:38:31.398Z","updated_at":"2026-03-06T10:32:28.995Z","avatar_url":"https://github.com/loopeer.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LPAlbum\n\n\u003cimg src=\"./Images/logo.png\" alt=\"LPAlbum\" title=\"LPAlbum\"/\u003e\n\n![Xcode 8.3+](https://img.shields.io/badge/Xcode-8.3%2B-blue.svg)\n![iOS 8.0+](https://img.shields.io/badge/iOS-8.0%2B-blue.svg)\n![Swift 3.1+](https://img.shields.io/badge/Swift-3.0%2B-orange.svg)\n\u003c!--[![Version](https://img.shields.io/cocoapods/v/AttributedStringWrapper.svg?style=flat)](https://cocoapods.org/pods/LPAlbum)--\u003e\n\u003c!--[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/loopeer/LPAlbum)--\u003e\n\u003c!--\u003ca href=\"http://cocoapods.org/pods/AttributedStringWrapper\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/at/AttributedStringWrapper.svg?label=Apps%20Using%20AttributedStringWrapper\u0026colorB=28B9FE\"\u003e\u003c/a\u003e--\u003e\n\u003c!--\u003ca href=\"http://cocoapods.org/pods/AttributedStringWrapper\"\u003e\u003cimg src=\"https://img.shields.io/cocoapods/dt/AttributedStringWrapper.svg?label=Total%20Downloads\u0026colorB=28B9FE\"\u003e\u003c/a\u003e--\u003e\n\n\n**LPAlbum** is a simple photo album \n\n\n## Overview\n\n**LPAlbum** is a album including the function of multiple images, photo browsing, camera taking pictures. It is very easy to use\n\n\u003ctable\u003e\n \u003ctr\u003e\n  \u003ctd\u003e\n    \u003cimg src=\"Images/demo1.png\" width=\"300\"/\u003e\n  \u003c/td\u003e\n  \u003ctd\u003e\n    \u003cimg src=\"Images/demo2.png\" width=\"300\"/\u003e\n  \u003c/td\u003e\n \u003c/tr\u003e\n\u003c/table\u003e\n\n## How to use\n\n1. Config\n\n\n```Swift\n\npublic extension LPAlbum {\n    public struct Config {\n        /// 最大选择数量\n        public var maxSelectCount: Int = 6\n        /// 每列照片数量\n        public var columnCount: Int = 4\n        /// 照片间距\n        public var photoPadding: CGFloat = 2.0\n        /// 是否有相机\n        public var hasCamera: Bool = true\n    }\n    \n    public struct Style {\n        /// `NavigationBar`标题颜色\n        public static var barTitleColor: UIColor = UIColor.white\n        /// `NavigationBar`背景颜色\n        public static var barTintColor: UIColor = UIColor.darkGray\n        /// `NavigationBar`item文本颜色\n        public static var tintColor: UIColor = UIColor.white\n        /// 状态栏样式\n        public static var statusBarStyle: UIStatusBarStyle = .lightContent\n        /// 下拉箭头图片\n        public static var arrowImage: UIImage = Bundle.imageFromBundle(\"meun_down\")!\n        /// 正常的选择框图片\n        public static var normalBox: UIImage = Bundle.imageFromBundle(\"circle_normal\")!\n        /// 选中的选择框图片\n        public static var selectedBox: UIImage = Bundle.imageFromBundle(\"circle_selected\")!\n        /// 选择框box的可点击区域向外的扩展size\n        public static var boxEdgeInsets = UIEdgeInsets(top: -5, left: -5, bottom: -5, right: -5)\n    }\n}\n\n```\n\n\n2. Error:\n\n\n```Swift\n\npublic enum AlbumError: Error {\n    case noAlbumPermission\n    case noCameraPermission\n    case moreThanLargestChoiceCount\n    case savePhotoError\n    \n    public var localizedDescription: String {\n        switch self {\n        case .noAlbumPermission: return String.local(\"没有相册访问权限\")\n        case .noCameraPermission: return String.local(\"没有摄像头访问权限\")\n        case .moreThanLargestChoiceCount: return String.local(\"达到了图片选择最大数量\")\n        case .savePhotoError: return String.local(\"保存图片失败\")\n        }\n    }\n}\n\n```\n\n\n3. Use: \n\n\u003e Tips: add row in your project info.plist\n\u003e 1. `Privacy - Photo Library Usage Description` : `Can I get photo album permissions?`\n\u003e 2. `Privacy - Camera Usage Description` : `Can I get camera permissions?`\n\u003e 3. `Localization native development region` : `en` or `china`\n\n```Swift\n\n// you can setup style yourself\nLPAlbum.Style.barTintColor = .gray\nLPAlbum.Style.tintColor = .white\n\n// show\nLPAlbum.show(at: self)  {\n    $0.columnCount = 4\n    $0.hasCamera = true\n    $0.maxSelectCount = 9 - self.photos.count\n}.targeSize({ (size) -\u003e CGSize in\n    return CGSize(width: 240, height: 240)\n}).error {(vc, error) in\n    vc.show(message: error.localizedDescription)\n}.complete { [weak self](images) in\n    self?.photos.append(contentsOf: images)\n    self?.collectionView.reloadData()\n    _ = images.map{ print($0.size) }\n}\n\n```\n\n\n## Features\n\n- [ ] Support for iCloud \n- [ ] Support for cutting\n- [ ] Support for selecting a single image\n- [ ] Support for choosing the original image\n- [ ] Add preview of the selected photos\n\n\n## Installation\n\n\n### 1. CocoaPods\n\n[CocoaPods](https://cocoapods.org/) is a dependency manager for Cocoa projects.\n\nSpecify LPAlbum into your project's Podfile:\n\n\n```ruby\n# source 'https://github.com/CocoaPods/Specs.git'\n\nplatform :ios, '9.0'\nuse_frameworks!\n\ntarget '\u003cYour App Target\u003e' do\n  pod 'LPAlbum', '~\u003e 0.0.9'\nend\n```\n\n\nThen run the following command:\n\n```sh\n$ pod install\n```\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopeer%2Flpalbum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopeer%2Flpalbum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopeer%2Flpalbum/lists"}