[英]UIImagePickerController - Retake button on custom Overlay (Swift)
I am trying to implement a custom cameraOverlayView with a UIImagePickerController
. 我正在尝试使用
UIImagePickerController
实现自定义cameraOverlayView。 I manage to hide the button and have my own interface , but a custom interface blocks the editing screen with the Preview option and the Retake. 我设法隐藏按钮并拥有自己的界面,但是自定义界面使用“预览”选项和“重新拍摄”来阻止编辑屏幕。 I noticed on some older posts adding two Notifications for "
_UIImagePickerControllerUserDidCaptureItem
", " _UIImagePickerControllerUserDidRejectItem
" and then adding and removing the overlay would fix the issue. 我注意到一些较旧的帖子为“
_UIImagePickerControllerUserDidCaptureItem
”,“ _UIImagePickerControllerUserDidRejectItem
”添加了两个通知,然后添加和删除叠加层将解决问题。 But with Swift 3 I cannot seem to find how to access these notifications and the delegate from UIImagePickerController
is very limited. 但是使用Swift 3我似乎无法找到如何访问这些通知,而
UIImagePickerController
的委托非常有限。 Is there another way ? 还有另外一种方法吗?
It seems like you cannot access the "Retake" event , so there is a need to create also a custom "Edit" screen. 您似乎无法访问“重新拍摄”事件,因此需要创建自定义“编辑”屏幕。 I have on the same customCameraOverlay , buttons for "Retake" and "Use it".
我有相同的customCameraOverlay,“Retake”和“Use it”按钮。 So when the user stops capturing I hide the record and the cancel button and I present the retake and use it options, adding also a preview.
因此,当用户停止捕获时,我隐藏了记录和取消按钮,我呈现了重拍并使用它选项,还添加了预览。 So when the user clicks on retake I reverse the buttons again and remove the preview View.
因此,当用户点击重拍时,我再次反转按钮并删除预览视图。 Likewise on "Use it" didfinishcapturing is being called
同样地,在“使用它”中,正在调用完成捕获
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.