【发布时间】:2012-04-25 10:38:42
【问题描述】:
我正在使用 IOS 标准图像裁剪功能(移动和缩放)在将图像提交到服务器之前对其进行裁剪。
但是,我意识到提供的裁剪具有平方比例(请参见下面的屏幕截图)
代码片段如下:
//set up image picker
self.imgPicker = [[[UIImagePickerController alloc] init]autorelease];
self.imgPicker.allowsEditing = YES;
self.imgPicker.delegate = self;
//Trigger get photo from library function
self.imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:self.imgPicker animated:YES];
如何允许“移动和缩放”编辑,同时允许用户在没有正方形比例限制的情况下进行裁剪?
【问题讨论】:
-
你说得对 CodaFi,这个问题已经在 stackoverflow 上被问过了。这个线程也很有用,因为用户建议他的框架:stackoverflow.com/questions/3740253/…。这是框架:github.com/yogev77/UIImagePickerWithEditor。但是我没用过,所以不能给出任何意见。
标签: ios uiimagepickercontroller crop