在移动和缩放屏幕中使用 UIImagePicker 选择的照片之前对其进行修改
您可能知道,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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不是那么简单的方法是自己实现移动和缩放功能。
使
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 :).