- Gets the picture of specified width.
- Cut out rectangles or circles / ellipses.
- Gets the video of no more than one time.
Download ZYImagePicker and try out the included you iPhone project or use CocoaPods.
To integrate ZYImagePicker into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'TargetName' do
pod 'ZYImagePicker', '~> 0.1.2'
end
Then, run the following command:
$ pod install
@property (nonatomic, strong)ZYImagePicker *imagePicker;
_imagePicker = [ZYImagePicker new];
[_imagePicker libraryPhotoWithController:self compressWidth:320 FormDataBlock:^(UIImage *image, ZYFormData *formData) {
// your code
}];
[_imagePicker libraryPhotoWithController:self cropSize:CGSizeMake(200, 200) imageScale:1 isCircular:false FormDataBlock:^(UIImage *image, ZYFormData *formData) {
// your code
}];
// from library
[_imagePicker libraryMoiveWithController:self maximumDuration:3 formDataBlock:^(UIImage *thumbnail, ZYFormData *formData) {
// your code
}];
// from camera
[_imagePicker cameraMoiveWithController:self maximumDuration:3 formDataBlock:^(UIImage *thumbnail, ZYFormData *formData) {
// your code
}];