Skip to content

XiFengLang/JKImageCutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;
   }

About

<iOS>图片裁剪器,支持圆形、方形裁剪

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published