在移动和缩放屏幕中使用 UIImagePicker 选择的照片之前对其进行修改

发布于 2024-08-07 06:29:23 字数 292 浏览 2 评论 0原文

您可能知道,UIKit 框架中的 UIImagePickerController 允许用户拍摄照片,然后将其移交给我的应用程序进行进一步处理。 如果属性 allowedEditing 设置为 YES,则允许用户在拍摄照片后移动和缩放照片。

我想要完成的是在用户看到移动和缩放屏幕之前修改代码中的照片。这是因为我想向照片添加一些视觉效果,并且用户应该能够使用已应用于照片的这些效果进行移动和缩放。

我知道有cameraOverlayView 属性,但就我而言,这对我来说没有用。

有什么想法吗?

谢谢,托马斯

as you probably know, the UIImagePickerController in the UIKit Framework allows the user to take a photo which is then handed over to my App for further processing.
If the property allowsEditing is set to YES, the user is allowed to move and scale the photo after taking it.

What I'd like to accomplish is to modify the photo in my code BEFORE the user is presented with the move and scale screen. This is because I'd like to add some visual effects to the photo and the user should be able to move and scale with these effects already applied to the photo.

I know that there's the cameraOverlayView property, but this is not useful in my case as far as I'm concerned.

Any ideas?

Thanks, Thomas

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一萌ing 2024-08-14 06:29:23

不是那么简单的方法是自己实现移动和缩放功能。
使 showsCameraControls NO。您可以设计自己的预览屏幕(使用修改后的图像)。

看起来 IOS5 的cameraOverlayView 中的触摸存在问题。确保上述解决方案也适用于 IOS5 :)。

Not so easy way is to implement move and scale functionality on your own.
make showsCameraControls NO. You can design your own preview screen (with modified Image).

Looks like there are issues with touches in IOS5 cameraOverlayView. Make sure the above solution works for IOS5 also :).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文