UIImagePickerController - crops picture to square (in portrait)

半世苍凉 提交于 2019-12-03 01:55:19

Check out GKImagePicker library, it allows to set your custom image crop area, like this:

self.imagePicker = [[GKImagePicker alloc] init];
self.imagePicker.cropSize = CGSizeMake(320, 90);
self.imagePicker.delegate = self;

[self presentModalViewController:self.imagePicker.imagePickerController animated:YES];

I know its really late to answer this question, But someone may find this helpful.

Change

[imagePicker setAllowsEditing:YES]; 

To

[imagePicker setAllowsEditing:NO];

Thanks, Jay

You can provide a custom cropping UI, but there is no way to change just the cropping rectangle of the standard one.

This link might help with that.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!