Skip to content

Yanyinghenmei/ZYImagePicker

Repository files navigation

ZYImagePicker

  1. Gets the picture of specified width.
  2. Cut out rectangles or circles / ellipses.
  3. Gets the video of no more than one time.

How to use

Download ZYImagePicker and try out the included you iPhone project or use CocoaPods.

Podfile

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

Simple code

_imagePicker must be a strong reference
@property (nonatomic, strong)ZYImagePicker *imagePicker;
_imagePicker = [ZYImagePicker new];
Gets the picture of the specified width.
[_imagePicker libraryPhotoWithController:self compressWidth:320 FormDataBlock:^(UIImage *image, ZYFormData *formData) {
      // your code
}];
Cut out rectangles or circles / ellipses.
[_imagePicker libraryPhotoWithController:self cropSize:CGSizeMake(200, 200) imageScale:1 isCircular:false FormDataBlock:^(UIImage *image, ZYFormData *formData) {
      // your code
}];
Gets the video of no more than one time.
// 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
}];

image image image

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published