Closed tuandao closed 11 years ago
I've been trying to figure this one out too, and things aren't working as expected.
(whoops)
I added some NSLog()
calls in setImage:
and setAspectRatio:
, because I tried setting the ratio in setImage:
:
[self setAspectRatio:1.0f];
But, the NSLog()
call in setAspectRatio:
never ran, though the ones in setImage:
do. I'm not sure why the call to setAspectRatio:
isn't working: I'm not getting any errors or anything.
In any case, I would think that you would need to add a setAspectRatio:
method to PECropViewController
that would call the same on self.cropView
(which is PECropView). But, the first step is to figure out why a straight call to setAspectRatio:
is failing.
It is not implemented yet to keep fixed aspect ratio on resizing. I will do my best to implement this feature as soon as possible. Thank you.
Done. 91067dc36fbfc56a3ccacb5ba9e113f2b8867230
Use cropAspectRatio
property set to 1.0, and keepingCropAspectRatio
property set to YES
.
Hi,
Its working fine if presentViewController:navigationController animated:YES
BUT if the presentViewController:navigationController animated:NO
this does't works crashes the app with the following log
2014-03-05 20:14:15.263 PEPhotoCropEditor[2932:70b] *\ Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 220.5]
This happens on this line
self.frame = [self cropRectMakeWithResizeControlView:resizeControlView];
Because the frame values are NaN on this scenario
Any solutions?
Thanks.
Could you open a new issue for that? Since this one is closed, your comment probably won't get the attention it deserves.
Opened a issue.
Thanks
Hi kishikawakatsumi,
Thanks for the awesome control. I just need to always crop image as square size, so when user drag the frame it always square and default frame also square with max width size. Could you show me how, thanks.
Tuan