我在这里看到这个问题:UIImagePicker 允许编辑卡在中心 https://stackoverflow.com/questions/12630155/uiimagepicker-allowsediting-stuck-in-center
好像以前有人遇到过这个问题,但是没有明确的解决方案。
复制步骤:
- 设置允许编辑=是
- 拍张照片
- 裁剪窗口出现,但每次我平移图像时,它都会弹回到中心。
我使用的是 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];
您只需要编写以下一行代码即可。
UIImage *image = [info valueForKey:UIImagePickerControllerEditedImage];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)