Open Bramnouwen opened 6 years ago
@Bramnouwen same problem ! Did you find a solution ?
Kind of, someone suggested dispatching the closing of the camera to the global/background thread, that made it faster but not 100% perfect
I'm going to be be implementing a camera myself now though as this seems to be abandoned and I don't need a too complicated camera anyway.
Good luck!
The closing or the opening ? Because for me its the opening who is longer..
Well, as the issue suggests, for me it was the closing of the camera :-)
Putting the closing of the camera in the following code worked for me, but I've now switched to coding the camera myself:
DispatchQueue.global(qos: .default).async {
//closing of camera here
}
Have you tried that? The opening of the camera worked perfectly for me so I didn't use it for that, but it's worth a shot.
Thanks @Bramnouwen i will try that. And your custom camera is not open source ? :)
It's nothing complicated haha, I just need to be able to record video with the back camera and be able to save it to the gallery, you can google tutorials that use AVFoundation to build a camera.
Here are some SO links I used to help:
There's a small delay when I'm closing the camera which can be seen here: https://imgur.com/a/BDGeFOK
After I dismiss the view you can see a small line at the bottom of the screen which disappears after a short delay and I don't know why this is happening.
This also happens when switching tabs if the camera view is shown as a tab instead of a modal screen.
Has anyone else encountered this problem?