-
Notifications
You must be signed in to change notification settings - Fork 176
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
pxlshpr
wants to merge
26
commits into
gekitz:master
Choose a base branch
from
pxlshpr:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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.
…s file isn’t provided)
…ton isn't responsive)
@@ -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; |
There was a problem hiding this comment.
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
.
Your changes worked great for cropping landscape images to a square size. |
removed hardcoded width, set it to screen width
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.