iPhone:如何实施“移动和扩展”从照片库中获取的图像的功能 [英] iPhone:How to implement "move and scale" functionality for image fetched from photo library
问题描述
如下图所示,我想为从照片库中提取的图像实现移动和缩放功能。
As shown in the following figure I want to implement "move and scale" functionality for the image fetched from the photo library.
如果您有任何想法或代码,请提供给我。
If you have any idea or code then provide me.
提前完成。
推荐答案
请参阅此 Jane Sales的回答
来自这个问题的答案设置尺寸为UIImagePickerController移动和缩放裁剪框
我建议的解决方案是禁用图像选择器的编辑
和自己处理。例如,我将图像放在可滚动的
可缩放图像视图中。在图像视图的顶部是一个固定位置
裁剪指南视图,用于绘制用户看到的裁剪指示。
假设指南视图具有可见矩形(要保留的部分
)和边缘宽度(要丢弃的部分)的属性,您可以像这样获得
裁剪矩形。
The solution I recommend is to disable editing for the image picker and handle it yourself. For instance, I put the image in a scrollable, zoomable image view. On top of the image view is a fixed position "crop guide view" that draws the crop indicator the user sees. Assuming the guide view has properties for the visible rect (the part to keep) and edge widths (the part to discard) you can get the cropping rectangle like so.
2)另一个链接
这篇关于iPhone:如何实施“移动和扩展”从照片库中获取的图像的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!