Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transitions to iOS 7 style and fixes some cropping issues #40

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Transitions to iOS 7 style and fixes some cropping issues #40

wants to merge 26 commits into from

Conversation

pxlshpr
Copy link

@pxlshpr pxlshpr commented Nov 11, 2013

Basically mimics the current iOS 7 style cropper in terms of the toolbar and the border.

Also begins things with an action sheet with the classic (take photo, choose from library) buttons.

Still needing a code cleanup and proper handling of the iPad case, which I'll have to get to once I complete the project I'm working on (hopefully this weekend).

Thanks for your work, it's really good and a lifesaver.

Ahmed Khalaf added 24 commits November 10, 2013 21:14
…r now (might not be the best place) and #import-ing it where necessary.
… empty spaces around the cropped image. Initially places image centered in crop rect. Fixes placement and cropping code by simplifying it.
…rary, and adds more independent support for the iPad as well (without having a reference to the PopoverController).
…r even into the toolbar, along with a padding to be able to see the crop rect. This doesn’t affect the size of the returned image.
@@ -71,7 +69,11 @@ - (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{

GKImageCropViewController *cropController = [[GKImageCropViewController alloc] init];
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000
cropController.preferredContentSize = picker.preferredContentSize;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will crash when running on iOS < 7. We should check at runtime if it's safe to call preferredContentSize.

@ataranlen
Copy link

Your changes worked great for cropping landscape images to a square size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants