iOS - 如何在UIImagePickerController中使用allowsEditing自定义裁剪矩形?

27

有没有办法在相机图像选择器中定义裁剪区域矩形?

1个回答

31
很不幸,不行。
正如 iOS 的“相机编程主题”中所述,除了默认设置之外,如果您想获得其他内容,则必须实现自定义裁剪 GUI:
"When using built-in editing controls, the image picker controller enforces certain options. For still images, the picker enforces a square cropping as well as a maximum pixel dimension. For movies, the picker enforces a maximum movie length and resolution. If you want to let the user edit full-size media, or specify custom cropping, you must provide your own editing UI."
如果您想让用户编辑完整大小的媒体,或指定自定义裁剪,则必须提供自己的编辑界面。请参考此链接: http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Articles/PickinganItemfromthePhotoLibrary.html#//apple_ref/doc/uid/TP40010408-SW1

10
这完全是苹果的总体计划的一部分,旨在强迫我们成为更好的开发者。 - John Doe

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接