You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using your framework in my app, it's cool, but I found some small issues: I present cropViewController with image with size (width: 1200.0, height: 1600.0) then press "Done" button without any changes(or crop and restore without dismissing the controller) and I get image with size (width: 1200.0, height: 1599.0) in the didCropToImage method. The same size is in the cropRect.
The text was updated successfully, but these errors were encountered:
I didn't try to fix this bug exactly in the pod(I looked up and there's problem with rounding in the calculations), but I found out how to deal with this bug. In my case, I just needed to know whether the image was cropped or not, and if it was cropped to take the crop data. So, I do a little trick, in the
delagate methods and I check the reset button's state there. If the button is enabled, then the image was cropped.
func cropViewController(_ cropViewController:CropViewController, didCropImageToRect rect:CGRect, angle:Int){letisImageCropped= cropViewController.toolbar.resetButton.isEnabled
if isImageCropped {
// The image is cropped, we can use the returned data.
}else{
// The image is not cropped.
}}
Hi, I'm using your framework in my app, it's cool, but I found some small issues: I present cropViewController with image with size (width: 1200.0, height: 1600.0) then press "Done" button without any changes(or crop and restore without dismissing the controller) and I get image with size (width: 1200.0, height: 1599.0) in the didCropToImage method. The same size is in the cropRect.
The text was updated successfully, but these errors were encountered: