I use default UIImagePickerController for taking photos / choosing them from a library. At some point, I present other ViewController over UIImagePickerController for customization of chosen photo. If a user selects Cancel option, I want to get him back to image choosing screen - in a case of camera source to screen with Use Photo / Retake buttons. After dismissing ViewController with customization buttons don't work (they work before).
I would rather not use AVFoundation here.
Here is some related code:
let storyBuilder = StoryBuilderViewController.storyboardController()
storyBuilder.delegate = self
photoPickerController.present(storyBuilder, animated: true)
This way I'm presenting my customization screen.
func resetButtonTapped(_ storyBuilder: StoryBuilderViewController) {
storyBuilder.dismiss(animated: true)
}
This code runs after dismissing.
So, nothing special, but buttons stop working
View Hierarchy looks like this:
So, there is nothing over this screen. Buttons properties isEnabled set to true. UIImagePickerController isn't nil. isUserInteractionEnabled is true
I've created a simple project with this error. It doesn't work either. Also, I've just had a case, when camera stops work entirely, even after app restart, with logs full of errors. Only restart of my phone helps.
More description
I have a start screen - RootViewController. I need to present UIImagePickerController with a camera over it. After a user makes a photo I need to present another controller - EditViewController (not dismissing UIImagePickerController, so if a user wants to take another photo - he just goes back). I do it like this:
picker(editController, animated: true) //picker - UIImagePickerController, editController - edit controller
As I said before, my user can go back - and here is a problem - if I dismiss editController, buttons on UIImagePickerController don't work.
Please, ask some questions, I don't understand, why is it hard to get my issue correctly.