Note that there are some explanatory texts on larger screens.

plurals
  1. POUIImagePickerController in IOS7 Snapshotting a view that has not been rendered results in an empty snapshot
    text
    copied!<p>When I am using UIImagePickerController in IOS7.0.3 it seems to throw an error "Snapshotting a view that has not been rendered results in an empty snapshot". My code is shown below</p> <pre><code>-(void) showCamera { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.showsCameraControls = YES; [self presentViewController:imagePicker animated:YES completion:nil]; } } </code></pre> <p>Delegate method is</p> <pre><code>- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [self dismissViewControllerAnimated:YES completion:nil]; NSString *mediaType = info[UIImagePickerControllerMediaType]; UIImage *image = nil; if ([mediaType isEqualToString:(__bridge NSString *)kUTTypeImage]) { image = info [ UIImagePickerControllerOriginalImage]; } if(picletImage != nil) { self.imageView.image = image; } } </code></pre> <p>I dont know whats wrong here but this seems to be working fine on iPad. I read through good number of articles but did not get a solution for this . I verified in instruments and seems to be a memory leak happening during camera initialization or once the picture is captured. I have been stuck with this for past 4 days , can some one can help me out as what is going wrong and also a possible solution for this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload