Skip to content

daelhoser/BVCropPhoto

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BVCropPhoto

BVCropPhoto is image cropping library for iOS.

System requirements

  • iOS 5.0 or higher

Installation

CocoaPods

pod 'BVCropPhoto'

Usage

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

Get the cropped image

retrieve from view directly

UIImage * croppedImage = self.cropPhotoView.croppedImage;

Example

Init

    DVCropViewController *controller = [[DVCropViewController alloc] init];
    controller.delegate = self;
    controller.sourceImage = [UIImage imageNamed:@"example1.jpg"];
    controller.cropSize = CGSizeMake(260, 286);

Get the cropped image

-(void)cropViewControllerDidCrop:(DVCropViewController *)sender croppedImage:(UIImage *)croppedImage{
    self.imageView.image = croppedImage;
}

License

BVCropPhoto is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Objective-C 97.6%
  • Ruby 2.4%