Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gekitz/GKImagePicker
Enables a custom crop rect for UIImagePickerController
https://github.com/gekitz/GKImagePicker
Last synced: 1 day ago
JSON representation
Enables a custom crop rect for UIImagePickerController
- Host: GitHub
- URL: https://github.com/gekitz/GKImagePicker
- Owner: gekitz
- License: mit
- Created: 2012-06-15T23:55:45.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2021-07-31T13:57:12.000Z (over 3 years ago)
- Last Synced: 2024-11-06T00:12:25.103Z (8 days ago)
- Language: Objective-C
- Size: 311 KB
- Stars: 592
- Watchers: 26
- Forks: 176
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
### GKImagePicker
Ever wanted a custom crop area for the UIImagePickerController? Now you can have it with _GKImagePicker_. Just set your custom crop area and that's it. Just 4 lines of code. If you don't set it, it uses the same crop area as the default UIImagePickerController.
### How to use it
- just drag and drop the files in under "GKClasses" & "GKImages" into your project.
- look at the sample code below.
- this project contains a sample project as well, just have a look at the implementation of `ViewController.m`
- have fun and follow [@gekitz](http://www.twitter.com/gekitz).### Sample Code
self.imagePicker = [[GKImagePicker alloc] init];
self.imagePicker.cropSize = CGSizeMake(320, 90);
self.imagePicker.delegate = self;
[self presentModalViewController:self.imagePicker.imagePickerController animated:YES];
This code results into the following controller + crop area:
![Sample Crop Image](https://dl.dropbox.com/u/311618/GKImageCrop/IMG_1509.PNG)
It's even possible to let the user adjust the crop area (thanks to [@pathonhauser](http://www.twitter.com/pathonhauser) for this pull request) by setting one additional property:
self.imagePicker.resizeableCropArea = YES;
This code results into the following controller + adjustable crop area:
![Sample Crop Image Adjustable](https://dl.dropbox.com/u/311618/GKImageCrop/IMG_2299.PNG)
### License
Under MIT. See license file for details.