问题描述
当打开工作与UIImagePickerController和设置allowedImageEditing = YES;有一个默认裁剪框为320x320。在我的例子中,我想设置裁剪框架为横向的图像为320x240,纵向的图像为240x320。但是,我没有能够找到一种方法来更改在编辑/裁剪照片时使用的320x320帧。你有任何人找到了办法吗?
when opening working with an UIImagePickerController and setting allowsImageEditing = YES; there is a default cropping frame that is 320x320. In my case, I would like to setup that cropping frame to 320x240 for images that are landscape, and 240x320 for images that are portrait. However, I haven't been able to find a way to change that 320x320 frame that is used when editing /cropping a photo. Has any of you found a way to do it?
谢谢!
推荐答案
您必须自行实现。
选择器仅执行320x320裁剪。
The picker only performs 320x320 cropping.
设置
允许ImageEditing= NO;
allowsImageEditing = NO;
现在您将获得完整的图像。然后,您将必须创建一个视图/视图控制器,它将按照您想要的比例裁剪。
Now you will get the full image back. Then you will have to create a view/view controller that will crop to the proportions you desire.
这篇关于如何更改UIImagePickerController裁剪框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!