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

JKImageCutter 1.0.3

JKImageCutter 1.0.3

Maintained by XiFengLang.



  • By
  • XiFengLang

JKImageCutter

通用型的图片裁剪器,支持圆形和方形裁剪,对长图、小图都有做兼容优化。

Example

CocoaPods

pod 'JKImageCutter','~> 1.0.3'

Usage

    JKImageCutViewController * cutVC = [[JKImageCutViewController alloc] init];
    cutVC.type = JKImageCutterTypeRounded; // JKImageCutterTypeSquare
    [cutVC cutImage:[UIImage imageNamed:@"img1.jpg"] completionHandler:^(UIImage *image) {
        self.imageView.image = image;
    }];
    [self.navigationController pushViewController:cutVC animated:YES];
    

不用担心Block会造成循环引用,内部已对Block进行优化


	if (self.completionHandler) {
        self.completionHandler(image);
        self.completionHandler = nil;
   }