BVCropPhoto is image cropping library for iOS.
- iOS 5.0 or higher
pod 'BVCropPhoto'
self.cropPhotoView = [[BVCropPhotoView alloc] init];
self.cropPhotoView.overlayImage = [UIImage imageNamed:@"crop-overlay-568h"];
self.cropPhotoView.sourceImage = [UIImage imageNamed:@"example1.jpg"];
self.cropPhotoView.cropSize = CGSizeMake(260, 286);
[self.view addSubview:self.cropPhotoView];
retrieve from view directly
UIImage * croppedImage = self.cropPhotoView.croppedImage;
DVCropViewController *controller = [[DVCropViewController alloc] init];
controller.delegate = self;
controller.sourceImage = [UIImage imageNamed:@"example1.jpg"];
controller.cropSize = CGSizeMake(260, 286);
-(void)cropViewControllerDidCrop:(DVCropViewController *)sender croppedImage:(UIImage *)croppedImage{
self.imageView.image = croppedImage;
}
BVCropPhoto is available under the MIT license. See the LICENSE file for more info.