I have a cameraOverlay with it’s own camera button and I use the takePicture method when they press the camera button and use the delegate method
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo: (NSDictionary *)info{
[CommonClass AddToStack:@"ReviewController:imagePickerController"];
PhotoOverlay *overlay = (PhotoOverlay*)picker.cameraOverlayView;
[overlay setupImage:[info objectForKey:UIImagePickerControllerOriginalImage]];
}
the setupImage: method just does sets the image for a UIImageView I have on the overlay
the problem with this is that there is a 0.3 second gap between the takePicture and the imagepicker delegate method so it looks really weird. I’ve seen apps transition immediately from pressing the camera to the final view when using a custom overlay.
has anybody encountered this?
The way to get the instant image is by doing a screenshot of the screen and using that image first, then call the
takePictureand replace it with the screenshot when it’s ready (the screenshot is a lower resolution than the actual image).Here is my snippet: