I am currently writing an iOS app and do not like the speed at which the UIImagePickerController disappears.
I call [self dismissModalViewControllerAnimated:YES]; the instant I am inside of - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info; And yet the imagePicker takes several moments to disappear, long enough on some photos that the app appears frozen to the user.
One solution I thought of was to just throw up a UIActivityIndicator infront of the UIImagePickerController but I have not figured out a way to accomplish this.
Thank you!
Edit: Any tips on how to save UIImages faster would help too I believe. Such as a way to do it asynchronously.
There is a great tutorial on doing this with grand central dispatch and code blocks by Ray Wenderlich :
http://www.raywenderlich.com/1888/how-to-create-a-simple-iphone-app-tutorial-part-33
You can also do this with a job queue and performSelector:onThread:withObject:waitUntilDone: if blocks are scary to you.
Basically, the idea is to do the least amount of real work on the main thread, because that’s where the UI is drawn. Below is RW’s solution, with the status part commented out. That’s where you put an activity indicator.