When I instantiate and present an UIImagePickerController, sometimes it will take up to 5 seconds for the video feed to show up and there will just be a black screen. I do instantiate the UIImagePickerController multiple times from different views. What could be the source of this problem?
Delays on UI stuff are usualy related to code not being ran on Main Thread. Only Main Thread can change the UI, so if your code happens to run on some other background thread it will have a few seconds delay. You can guarantee a block of code will be ran on Main Thread with:
dispatch_async(dispatch_get_main_queue(), ^{
// Your code
});
I've answered a similar problem here:
dismissViewControllerAnimated:completion: has a couple second delay
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With