简体   繁体   English

UIImagePickerController - 自定义叠加(Swift)上的重新启动按钮

[英]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.

相关问题 使用UIImagePickerController自定义“使用”,“取消”,“重拍”和“倒车”按钮事件 - Custom “Use”, “Cancel”,“Retake” and “Reverse Camera” button event using UIImagePickerController 替换拍摄并重新拍摄按钮UIImagePickerController - Replace shoot and retake button UIImagePickerController 带有覆盖的iOS 7 UIImagePickerController - 重新拍摄并使用不可用的照片 - iOS 7 UIImagePickerController with Overlay - retake and use photo not usable UIImagePickerController startVideoCapture与自定义叠加 - UIImagePickerController startVideoCapture with custom overlay 将叠加层添加到自定义UIImagePickerController吗? - Adding overlay to custom UIImagePickerController? 如何在Swift 4的自定义UIImagePickerController中设置按钮 - How to set a button in custom UIImagePickerController in swift 4. 具有自定义叠加层和编辑图像的UIImagePickerController - UIImagePickerController with Custom Overlay and Edit Image UIImagePickerController使用自定义叠加层缩放和裁剪 - UIImagePickerController scaling and cropping with custom overlay 如何在UIImagePickerController中访问“Retake”选项? - How to access “Retake” option in UIImagePickerController? Swift:如何更改UIImagePickerController的“使用照片”,“取消”,“拍摄”,“重拍”按钮的默认行为 - Swift: how to change default behaviour of buttons “Use Photo”, “Cancel”, “Shoot”, “Retake” of UIImagePickerController
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM