-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add Option to crop image and use edited image. #36
Conversation
… it to quick implementation of a cropped image by the standard image editor. Also Added the userPickerInfo [String : Any]? property that stores the result of the User edit. All of that keeping the standard functionality.
Looks good. Could you add these new properties to the ReadMe under |
Sure, i have just pushed the changes. |
@joaodforce Thanks for adding this functionality! I really like it! @mats-claassen Could you create a new release containing this PR? |
I added ImageRow to my CocoaPods Podfile and installed. It says it is using version 3.0.0 but I am not seeing any references to the new properties that allow image editing. Is there a trick to get CocoaPods to download the latest and greatest version which includes this enhancement? |
If it says it installed 3.0 it did. Maybe you need to need to clean your Xcode Build folder and rebuild. |
After trying a bunch of things (including reinstalling cocoapods) I was able to get the latest version by adding this to my Podfile instead of just pod 'ImageRow' so perhaps there is some issue with cocoapods? pod 'ImageRow', :git => 'https://github.com/EurekaCommunity/ImageRow' |
Take a look at the commit history. There is no cocoa pods release containing this PR yet. Release of 3.0.0 was before this got merged. |
@axiom-media as @funkenstrahlen said, there was no PR for this update, so for cocoapods there were no changes to this repository, so to get this you would have to clear your pods repository cache, then reinstall it. |
I added the below to my image row: $0.allowEditor = true but when I take picture from the row, the editing toolbars do not show up. Is this related to the above issue with cocoa pods version? I am using imagerow version 3.1.0. |
When I set both row.allowEditor and row.useEditedImage to true I get the crop UI after taking a photo with the camera on my iPhone 7 Plus but the behaviour is quite strange. I can zoom and pan the image within the crop square, but I can't move the photo all the way to the top or bottom. It seems to have an arbitrary boundary that it won't let me pan beyond. Is this the expected behaviour or some sort of bug? |
This is the behavior of the default iOS system cropper, I find it weird too, but it is easier to use it than to make one yourself, besides on iOS 12 it looks like it will be revamped. |
I was implementing ImageRow into my project and noticed there was no way to use the editor.
I Mean, the snippet bellow allowed me to show the editor after my selection.
row.onPresent({ (Forms, Picker) in Picker.allowsEditing = true })
However there was no way to use the edited Photo, or to get access to the EditInformation, because it is not possible to change de delegate on the
onPresent
callback.So my solution was add 2 properties, allowEditor and useEditedImage.
Both are default to
false
The former if set to
true
shows the editor after a Image Selection.The ladder switches the property get from the callback to use the Cropped Image instead of the original.
I Also added a property called userPickerInfo, which stores The Edit information, that cannot be accessed otherwise.
I was also thinking about adding some options to customize the UIImagePickerController even further, but this is enough for now.