使用选定区域的矩形框裁剪图像?

我正在寻找一个很好的教程或示例代码,它将展示如何从iphone相机裁剪图像

有些东西

在此处输入图像描述

但你会用手指控制角落

任何小费都会被大肆宣传,因为我试图以多种方式但没有得到结果。

按钮操作中的一些更改

-(IBAction) cropImage:(id) sender{ // Create rectangle that represents a cropped image // from the middle of the existing image float xCo,yCo; float width=bottomCornerPoint.x-topCornerPoint.x; float height=bottomCornerPoint.y-topCornerPoint.y; if(width<0) width=-width; if(height<0) height=-height; if(topCornerPoint.x