OCCamera
OCCamera copied to clipboard
dismissViewControllerAnimated does not work well
Hi Oliver. Its a great code.
but i need dimissing the camera when I finish the record.
i put this at delegate methods (didTakePhoto, didTakeVideo)
[self.OCViewController dismissViewControllerAnimated:YES completion:nil];
And he have a long delay to hide a camera. Why ? Have you any ideia ?
Thanks!.
Hmm, I wonder if maybe something is blocking the main thread at that time? Are you doing any image processing before/after calling dismissViewController...? If so, I would recommend putting it on a BG dispatch queue. So something like this (pseudo-code)
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//Work with the image
});
[self.OCViewController dismissViewControllerAnimated:YES completion:nil];