All Projects → huxinguang → XGImagePickerController

huxinguang / XGImagePickerController

Licence: MIT license
iOS相册图片/视频选择器

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to XGImagePickerController

Picker
Picker - A CameraX based WhatsApp Style Image-Video Picker
Stars: ✭ 69 (+115.63%)
Mutual labels:  camera, picker, imagepicker
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+11340.63%)
Mutual labels:  camera, picker, imagepicker
ProPicker
ProPicker is a file picker (image, video, file) library for Android. It helps you to pick any file and return the result in a convenient way
Stars: ✭ 25 (-21.87%)
Mutual labels:  camera, picker, imagepicker
MJMediaPicker
A Custom Class to select media from camera ,video or photo library by just adding a single file
Stars: ✭ 15 (-53.12%)
Mutual labels:  camera, imagepicker, assetpicker
Lassi-Android
All in 1 picker library for android.
Stars: ✭ 108 (+237.5%)
Mutual labels:  camera, picker
Opalimagepicker
A multiple image picker for iOS, written in Swift
Stars: ✭ 165 (+415.63%)
Mutual labels:  picker, imagepicker
android-pickpic
Ready to use library that allows people to select pictures from their device and Facebook account.
Stars: ✭ 12 (-62.5%)
Mutual labels:  camera, picker
Rxpaparazzo
RxJava extension for Android to take images using camera and gallery and pick files up
Stars: ✭ 467 (+1359.38%)
Mutual labels:  camera, picker
Zlphotobrowser
Wechat-like image picker. Support select normal photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
Stars: ✭ 3,962 (+12281.25%)
Mutual labels:  picker, imagepicker
Coco
基于kotlin、简洁易用的调用系统拍照或图片选择库
Stars: ✭ 276 (+762.5%)
Mutual labels:  camera, imagepicker
Imagepicker
📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera
Stars: ✭ 623 (+1846.88%)
Mutual labels:  camera, imagepicker
Androidpicker
安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器、图片选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarPlatePicker/CalendarPicker/ColorPicker/FilePicker/ImagePicker etc.
Stars: ✭ 5,320 (+16525%)
Mutual labels:  picker, imagepicker
Piximagepicker
Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.
Stars: ✭ 488 (+1425%)
Mutual labels:  picker, imagepicker
Flutter wechat camera picker
A camera picker in WeChat style.
Stars: ✭ 95 (+196.88%)
Mutual labels:  camera, picker
Insgallery
📸 Instagram-like image picker for Android (一款 UI 炫酷高仿 Instagram 的图片、视频选择器)
Stars: ✭ 409 (+1178.13%)
Mutual labels:  picker, imagepicker
Rximagepicker
Android图片相册预览选择器、支持AndroidX,支持图片的单选、多选、图片预览、图片文件夹切换、在选择图片时调用相机拍照
Stars: ✭ 85 (+165.63%)
Mutual labels:  camera, imagepicker
Contentmanager
Android library for getting photo or video from a device gallery, cloud or camera. Working with samsung devices. Made by Stfalcon
Stars: ✭ 108 (+237.5%)
Mutual labels:  camera, picker
Tzimagepickercontroller
一个支持多选、选原图和视频的图片选择器,同时有预览、裁剪功能,支持iOS6+。 A clone of UIImagePickerController, support picking multiple photos、original photo、video, also allow preview photo and video, support iOS6+
Stars: ✭ 7,740 (+24087.5%)
Mutual labels:  imagepicker, imagepickercontroller
Bottomsheet Imagepicker
Modern image picker for Android
Stars: ✭ 267 (+734.38%)
Mutual labels:  picker, imagepicker
Matisse
基于知乎Matisse增强,一行代码实现图片/视频选择,裁剪,微信同款视频录制和拍照,无需权限申请!
Stars: ✭ 174 (+443.75%)
Mutual labels:  camera, imagepicker

功能描述

XGAssetPickerController是一款iOS相册选择器,支持图片、视频拍摄,多图片、多视频混选及预览, 支持Gif浏览(iOS11+),多个相册目录同一图片/视频可自动排重,并具有记录已选图片/视频的功能。

系统要求

该项目最低支持 iOS 8.0+

演示项目

  1. 命令行进入Demo文件夹路径下,并执行pod install
  2. 打开XGAssetPickerController-Demo.xcworkspace

安装

CocoaPods

  1. Podfile 中添加 pod 'XGAssetPickerController'
  2. 执行 pod installpod update
  3. #import "XG_AssetPickerController.h"

手动安装

  1. 下载 XGAssetPickerController 文件夹内的所有内容。
  2. 将 XGAssetPickerController 内的源文件添加(拖放)到你的工程。
  3. 由于用到了FLAnimatedImage,所以需要下载FLAnimatedImagehttps://github.com/Flipboard/FLAnimatedImage),并添加(拖放)到你的工程。
  4. #import "XG_AssetPickerController.h".

使用方法

  1. 先使用[[XG_AssetPickerManager manager] handleAuthorizationWithCompletion:^(XG_AuthorizationStatus aStatus) { }];检查是否获取相册权限,然后根据XG_AuthorizationStatus做进一步处理

  2. 初始化XG_AssetPickerOptions对象来配置选择器,maxAssetsCount表示最大可选择数量,videoPickable表示是否可选择视频,已选的图片或者视频会保存在pickedAssetModels数组中。

  3. 使用初始化选择器XG_AssetPickerController,然后 UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:photoPickerVc]; [self presentViewController:nav animated:YES completion:nil];

  4. 遵循<XG_AssetPickerControllerDelegate>协议,并实现协议方法: - (void)assetPickerController:(XG_AssetPickerController *)picker didFinishPickingAssets:(NSArray<XG_AssetModel *> *)assets;,选择结果在参数assets中。

    具体使用方法可参见示例Demo

注意事项

  1. 如果运行崩溃,崩溃信息log为:This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription/NSCameraUsageDescription key with a string value explaining to the user how the app uses this data. 请检查Info.plist是否添加相册/相机权限: NSPhotoLibraryUsageDescription/NSCameraUsageDescription

  2. 模拟器环境下,虽然在工程的Localizations配置中添加了简体中文Chinese(Simplified),但相册名称仍会默认为英文,这是正常的,因为Localizations在真机环境下才会生效(即真机环境下相册名称会显示成中文)。

许可证

XGAssetPickerController 使用 MIT 许可证,详情见 LICENSE 文件。



Introduction

XGAssetPickerController is an iOS album picker that supports mixed multi-image,multi-video selection and preview. Gif browsing is supproted on iOS 11.0+. Same images or videos in different album can be automatically detected, and selected images or videos can be recorded.

Requirements

This library requires iOS 8.0+ .

Demo Project

  1. Use the terminal to enter the path of Demo,then excute pod install
  2. Click XGAssetPickerController-Demo.xcworkspace

Installation

CocoaPods

  1. Add pod 'XGAssetPickerController' to your Podfile.
  2. Run pod install or pod update.
  3. #import "XG_AssetPickerController.h"

Manually

  1. Download all the files in the XGAssetPickerController subdirectory.
  2. Add the source files to your Xcode project.
  3. This library references FLAnimatedImage, so you need to download FLAnimatedImage (https://github.com/Flipboard/FLAnimatedImage) and add its source files to your Xcode project too.
  4. #import "XG_AssetPickerController.h".

Usage

  1. Check if you get an access to the photo library using [[XG_AssetPickerManager manager] handleAuthorizationWithCompletion:^(XG_AuthorizationStatus aStatus) { }];
  2. Initialize a XG_AssetPickerOptions object to config the XG_AssetPickerController
  3. Initialize a XG_AssetPickerController using initWithOptions: delegate: method,and present it using UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:photoPickerVc]; [self presentViewController:nav animated:YES completion:nil];
  4. Adopt the XG_AssetPickerControllerDelegate protocol and implement it's required method assetPickerController: didFinishPickingAssets:

Notice

If your app crashed with message like This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription/NSCameraUsageDescription key with a string value explaining to the user how the app uses this data., please check if the corresponding usage description is added in the app's Info.plist.

License

XGAssetPickerController is provided under the MIT license. See LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].