CocoaPods trunk is moving to be read-only. Read more on the blog, there are 11 months to go.

CDZImagePicker 1.0.0

CDZImagePicker 1.0.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jan 2017

Maintained by nemocdz.



  • By
  • Nemocdz

This is a ImagePickerController with buttons of action and collection of photos.

And the button can add beautiful icon like Snapseed used.

Demo Preview

ImagePickerDemo2

Changelog

  • Add Permisson Check
  • CollectionView Realtime Refresh

Installation

Manual

Add "CDZImagePicker" files to your project

Usage

  • Use default style
#import "CDZImagePickerViewController.h"
 CDZImagePickerViewController *imagePickerController = [[CDZImagePickerViewController alloc]init];
[imagePickerController openPickerInController:self withImageBlock:^(UIImage *image) {
        if (image) { //if image has changed
           self.imageView.image = image;//your code
        }
        [self.backgroundView removeFromSuperview];//your code
    }];
  • Use in iOS10

    Open "Info.plist" file in your project and add

<key>NSCameraUsageDescription</key>    
<string>cameraDesciption</string>

<key>NSPhotoLibraryUsageDescription</key>    
<string>cameraDesciption</string>
  • Change style of action button
#import "CDZImagePickerActionsItem.h"

​ And init the actionArray with CDZImagePickerActionItem with title, action, image and order you want.

imagePickerController.actionArray = [NSMutableArray arrayWithObjects:       [[CDZImagePickerActionsItem alloc]initWithTitle:@"打开设备上的图片" withActionType:CDZImagePickerLibraryAction withImage:[UIImage imageNamed:@"phone-icon.png"]],
[[CDZImagePickerActionsItem alloc]initWithTitle:@"相机" withActionType:CDZImagePickerCameraAction withImage:[UIImage imageNamed:@"camera-icon.png"]]
 [[CDZImagePickerActionsItem alloc]initWithTitle:@"打开最新图片" withActionType:CDZImagePickerRecentAction withImage:[UIImage imageNamed:@"clock-icon.png"]],  nil];

Articles

iOS中写一个仿Snapseed的ImagePickerController(照片选择器 )

iOS中权限封装小tips和监测相册变化

Requirements

iOS 8.0 Above

TODO

  • Memory optimize
  • Add Cocoapods

Contact

License

CDZImagePicker is available under the MIT license. See the LICENSE file for more info.