带allowEditing的UIImagePickerController不允许平移裁剪 [英] UIImagePickerController with allowsEditing doesn't allow panning to crop

查看:246
本文介绍了带allowEditing的UIImagePickerController不允许平移裁剪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里看到了这个问题: UIImagePicker允许编辑卡在中心

I saw this question here: UIImagePicker allowsEditing stuck in center

以前似乎有人遇到过这个问题,但是没有明确的解决方案。

It seems someone had this problem before, but there's no clear resolution.

复制步骤:


  1. 设置allowEditing = YES

  2. 拍照

  3. 裁剪窗口出现,但是每当我平移图像时,它就会快速回到中心。

我在iOS 7.0.3上。

I'm on iOS 7.0.3.

这是我的代码:

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];

imagePicker.delegate = self;
imagePicker.modalPresentationStyle = UIModalPresentationCurrentContext;
imagePicker.allowsEditing = YES;
[self presentViewController:imagePicker animated:YES completion:nil];


推荐答案

您只需编写一行代码即可。

You just need to write bellow single line of code.

UIImage *image = [info valueForKey:UIImagePickerControllerEditedImage];

这篇关于带allowEditing的UIImagePickerController不允许平移裁剪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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