All Projects → cloxnu → ConvenientImagePicker

cloxnu / ConvenientImagePicker

Licence: MIT, MIT licenses found Licenses found MIT LICENSE MIT LICENSE.md
🏞🌅🌄🎇🌇🏙🌃🌉🌁the new iOS image picker. Beautiful, delicate, and customizable.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to ConvenientImagePicker

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 (-43.18%)
Mutual labels:  image-picker, imagepicker
PhotoSelectAndCrop
This package integrates a UIImagePickerController into a SwiftUI app. Obtain 1) a copy of the original image, 2) a scaled and / or cropped version of it, 3) a CGFloat and 4) CGPoint. The CGFloat and CGPoint represent the scale and position of the original image used to make the processed version.
Stars: ✭ 57 (+29.55%)
Mutual labels:  imagepicker, imagepickercontroller
Tzimagepickercontroller
一个支持多选、选原图和视频的图片选择器,同时有预览、裁剪功能,支持iOS6+。 A clone of UIImagePickerController, support picking multiple photos、original photo、video, also allow preview photo and video, support iOS6+
Stars: ✭ 7,740 (+17490.91%)
Mutual labels:  imagepicker, imagepickercontroller
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+8220.45%)
Mutual labels:  image-picker, imagepicker
Insgallery
📸 Instagram-like image picker for Android (一款 UI 炫酷高仿 Instagram 的图片、视频选择器)
Stars: ✭ 409 (+829.55%)
Mutual labels:  image-picker, imagepicker
Imagepicker
📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera
Stars: ✭ 623 (+1315.91%)
Mutual labels:  image-picker, imagepicker
Imagepicker
完全仿微信的图片选择,并且提供了多种图片加载接口,选择图片后可以旋转,可以裁剪成矩形或圆形,可以配置各种其他的参数
Stars: ✭ 4,225 (+9502.27%)
Mutual labels:  image-picker, imagepicker
XGImagePickerController
iOS相册图片/视频选择器
Stars: ✭ 32 (-27.27%)
Mutual labels:  imagepicker, imagepickercontroller
ImagePicker
UIImagePickerController for camera and photo library
Stars: ✭ 26 (-40.91%)
Mutual labels:  imagepickercontroller
SSImagePicker
Easy to use and configurable library to Pick an image from the Gallery or Capture an image using a Camera... 📸
Stars: ✭ 227 (+415.91%)
Mutual labels:  imagepicker
Imagepicker
Android下的图片选择与裁剪开源库(android image picker and cropper library)
Stars: ✭ 223 (+406.82%)
Mutual labels:  image-picker
nativescript-imagepicker
Imagepicker plugin supporting both single and multiple selection.
Stars: ✭ 103 (+134.09%)
Mutual labels:  imagepicker
ImagePicker
Android image picker
Stars: ✭ 17 (-61.36%)
Mutual labels:  imagepicker
WAProfileImage
WAProfileImage - A library for Android for choosing and editing profile image like WhatsApp
Stars: ✭ 29 (-34.09%)
Mutual labels:  imagepicker
Image Upload Example
Demonstration of how to upload images from the ImagePicker, using a node backend to upload to S3
Stars: ✭ 214 (+386.36%)
Mutual labels:  image-picker
Facebookimagepicker
FacebookImagePicker is Facebook album photo picker written in Swift.
Stars: ✭ 220 (+400%)
Mutual labels:  image-picker
image picker flutter
ImagePicker
Stars: ✭ 27 (-38.64%)
Mutual labels:  image-picker
MJMediaPicker
A Custom Class to select media from camera ,video or photo library by just adding a single file
Stars: ✭ 15 (-65.91%)
Mutual labels:  imagepicker
cordova-plugin-advanced-imagepicker
Cordova Plugin for an advanced (multiple) ImagePicker
Stars: ✭ 23 (-47.73%)
Mutual labels:  imagepicker
Daguerre
Local image and video selector for Android
Stars: ✭ 33 (-25%)
Mutual labels:  image-picker

Header

ConvenientImagePicker

ConvenientImagePicker

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.


Release Notes

the 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.

Overview

ConvenientImagePicker provides smooth interaction, has excellent user experience, it can display system photo album and can also display the specified images.

It is worth emphasizing that the ConvenientImagePicker view has precise gesture control.

OverviewDetailview

Requirements

  • iOS 9.3+
  • Xcode 9.0+
  • Swift 4.0+

Installation

ConvenientImagePicker can be installed through CocoaPods, add the following entry to your Podfile:

pod 'ConvenientImagePicker'

Then run pod install,

and include the image picker wherever you need it with

import ConvenientImagePicker

, it's really a simple way.

Usage

When you prepare to present this image picker, we assume that you will call a function like this:

func PresentPhotoPicker()

Well, the most simplest version is add the following code in this function:

let pickerViewController = PickerViewController()
pickerViewController.delegate = self
pickerViewController.isSupportLandscape = true // A Boolean value that determines whether the ability of landscape exists.
self.present(pickerViewController, animated: true, completion: nil)

Then, you are supposed to implement ConvenientImagePickerDelegate in your own view controller:

And implement these delegate function:

func imagePickerDidCancel(_ selectedImages: [Int : UIImage])
func imageDidSelect(_ imagePicker: PickerViewController, index: Int, image: UIImage?)
func imageDidDeselect(_ imagePicker: PickerViewController, index: Int, image: UIImage?)
func imageSelectMax(_ imagePicker: PickerViewController, wantToSelectIndex: Int, wantToSelectImage: UIImage?)

imagePickerDidCancel will inform you that user has cancelled the image picker, and return the images user has selected.

imageDidSelect will inform you that user has selected an image.

imageDidDeselect will inform you that user has deselected an image.

imageSelectMax will inform you that user want to select an image, but this time he has selected the limit number of images.


You can use imagePicker.selectedImageCount in last 3 functions to get the number of the images user has selected.

Do not initialize pickerViewController outside of function PresentPhotoPicker.

So far, this is the simplest usage of this pod.

Optional Configuration

Sure, You can use more features of the image picker, or even customize it, instead of just using the default configuration.

Start with let pickerViewController = PickerViewController() :

pickerViewController.maxNumberOfSelectedImage = 50 // The maximum number of pictures allowed.
pickerViewController.allowMultipleSelection = true // A Boolean value that determines whether the picker view can mutiple selection.
pickerViewController.numberOfPictureInRow = 4 // The number of pictures in a row.
pickerViewController.intervalOfPictures = 5.0 // The interval between pictures.
pickerViewController.isSimpleMode = true // A Boolean value that determines whether the title label, count view, and close button exist.
pickerViewController.images = nil // The displayed images, it's will be photo library if nil.
pickerViewController.isDarkMode = false // A Boolean value that determines whether darkmode enable.
pickerViewController.isSwitchDarkAutomately = true // A Boolean value that determines whether darkmode can switched automately. (only iOS 13 valid)
pickerViewController.initialSelectedIndex = [0,1,2,3,4] // A set of index of selected image when the picker appears.
pickerViewController.isAnimated = true // A Boolean value that determines whether the appear animation exists.
pickerViewController.customSelectedImage // A selectedImage type value that relates to the image of selected picture.
pickerViewController.isSupportLandscape = true // A Boolean value that determines whether the ability of landscape exists.
pickerViewController.assetsSortKey = "modificationDate" // A String value that determines whether the order key of all assets.
pickerViewController.assetsSortAscending = false // A Boolean value that determines whether the order way of all assets.

when 'isSimpleMode = false'

simpleMode=false

When 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)

You can customize titleView, titleLabel, countLabel, and doneButton when isSimpleMode = false.

You can also customize titleViewEffectView, mainView, and collectionView regardless of the value of isSimpleMode, because they are always exist.

By the way, decorationBar can be customized in the case of isSimpleMode = true.

If more in-controller-override needed, extension PickerViewController is necessary.

⚠️Notice

  • Do not forget to add NSPhotoLibraryUsageDescription in your Info.plist if you want to present a photo picker.
  • Check read album permissions before using photo picker.
  • Please initialize new variable pickerViewController whenever preparing to present the image picker.

Instance

In TextCard, which is an iOS App has imported ConvenientImagePicker.

TextBoxIconNew

instance

License

ConvenientImagePicker is released under the MIT license. See LICENSE for details.

Thank you for your support!🙏

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].