AnonProgrammer
AnonProgrammer

Reputation: 239

Issue with ImagePickerController cropping

I'd like user to be able to crop images they've selected from photo library via ImagePickerController.

Ive allowed editing.

self.imgPicker.allowsEditing = true

And retrieve edited version of image.

let img = info[UIImagePickerControllerEditedImage] as? UIImage

The top of the image is not fully cropped. This is Apples code. Do I need to implement something custom?

Crop (should only show image, all white is cropped out):

enter image description here

Result:

enter image description here

Upvotes: 0

Views: 559

Answers (1)

iOS Developer
iOS Developer

Reputation: 558

It's a default behavior when you click picture from the camera this issue won't arise but when you pick a picture from the photo gallery it will be there.

You can always use the alternative in your case I would suggest YPImagePicker

OR you can crop the image manually refer this LINK

I hope it helps.

Upvotes: 2

Related Questions