[英]How can I remove the cameraOverlayView from the editing screen of UIImagePickerController?
I've set a custom view as the cameraOverlayView
of an UIImagePickerController
我已经将自定义视图设置为UIImagePickerController
的cameraOverlayView
and enabled editing mode on it. 并启用了编辑模式。
Now when it switches to editing mode the overlay view is still there. 现在,当它切换到编辑模式时,覆盖视图仍然存在。 How can I remove it from the editing view? 如何将其从编辑视图中删除?
I haven't found anything related to this in the official documentation. 我没有在官方文档中找到与此相关的任何内容。
Have you tried view.removeFromSuperview ? 您是否尝试过view.removeFromSuperview ?
I take it you've implemented the delegate function 我认为您已经实现了委托功能
optional func imagePickerController(_ picker: UIImagePickerController,
didFinishPickingMediaWithInfo info: [String : AnyObject])
and this happens before that function gets called. 而这发生在该函数被调用之前。
Can your custom view detect that its parent has changed and remove itself? 您的自定义视图可以检测到其父视图已更改并删除吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.