CocoaPods trunk is moving to be read-only. Read more on the blog, there are 11 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Jan 2017 |
Maintained by nemocdz.
This is a ImagePickerController with buttons of action and collection of photos.
And the button can add beautiful icon like Snapseed used.
Add "CDZImagePicker" files to your project
#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>#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];iOS中写一个仿Snapseed的ImagePickerController(照片选择器 )
iOS 8.0 Above
CDZImagePicker is available under the MIT license. See the LICENSE file for more info.