如何使用UIImagePickerControllerCropRect [英] How to use UIImagePickerControllerCropRect

查看:1855
本文介绍了如何使用UIImagePickerControllerCropRect的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想出了一种方法来改变裁剪框中出现的捕获来自 UIImagePickerViewController 图像后的rect。这可以在 UIImagePickerControllerCropRect 的帮助下完成。但我不知道如何使用它。最初的裁剪框是正方形。我想要它是矩形。

有人可以帮助我或与我分享一个例子吗?

最好的问候,

Nitish

I just figured out a way to change rect for crop box which appears after capturing an image from UIImagePickerViewController. This can be done with help of UIImagePickerControllerCropRect. But I have no idea how to use it. Originally the crop box is square. I want it to be rectangular.
Can someone help me or share an example with me?
Best regards,
Nitish

推荐答案

您不能使用内置的UIImagePickerController功能。很抱歉,您无法控制裁剪框的大小。

You cannot do this using the built in UIImagePickerController functionality. Unfortunately, you can't control the size of the crop box.

这是一个在github上的项目,可以帮助你完成你正在做的事情(结帐 YSImageCrop.h )。

Here is a project on github that may help you accomplish what you are looking to do (checkout YSImageCrop.h).

基本上,底线是你必须自己实现UIImagePickerController功能。我相信 UIImagePickerWithEditor 项目是一个很好的开始。

Basically, the bottom line is that you have to implement the UIImagePickerController functionality yourself. I believe the UIImagePickerWithEditor project is a good place to start.

这篇关于如何使用UIImagePickerControllerCropRect的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆