Note that there are some explanatory texts on larger screens.

plurals
  1. POAfter calling UIImagePickerController multiple times the device restarts
    primarykey
    data
    text
    <p>I implement UIImagePickerController delegate, UINavigationController delegate, UIPopOverController delegate. I have no clue what the problem is. My device restarts after calling this 3, 4 or 5 times ( It is different each build ). Please help me fix it!!</p> <p>EDIT: I get this error: </p> <pre><code>More than maximum 5 filtered album lists trying to register. This will fail. </code></pre> <p>Here is the code I am using to call UIImagePickerController and get the image:</p> <pre><code>- (IBAction)imgPickerPressed:(id)sender { if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) { imgPickerTypeActionSheet = [[UIActionSheet alloc] initWithTitle:@"Choose image source:" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Camera", @"Photo Library", nil]; [imgPickerTypeActionSheet showInView:self]; } else { UIImagePickerController *controller = [[UIImagePickerController alloc] init]; [controller setDelegate:self]; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { [controller setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; } imgPickerPopOver = [[UIPopoverController alloc] initWithContentViewController:controller]; imgPickerPopOver.delegate = self; [imgPickerPopOver presentPopoverFromRect:CGRectMake(imgPickerButton.frame.origin.x, imgPickerButton.frame.origin.x-250, 0.0, 0.0) inView:self permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES]; } } - (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex { if ([actionSheet isEqual:imgPickerTypeActionSheet]) { if (buttonIndex == 0) { UIImagePickerController *controller = [[UIImagePickerController alloc] init]; [controller setDelegate:self]; [controller setSourceType:UIImagePickerControllerSourceTypeCamera]; [[delegate getVC] presentModalViewController:controller animated:YES]; } if (buttonIndex == 1) { UIImagePickerController *controller = [[UIImagePickerController alloc] init]; [controller setDelegate:self]; [controller setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; imgPickerPopOver = [[UIPopoverController alloc] initWithContentViewController:controller]; imgPickerPopOver.delegate = self; [imgPickerPopOver presentPopoverFromRect:CGRectMake(imgPickerButton.frame.origin.x, imgPickerButton.frame.origin.x-250, 1, 1) inView:self permittedArrowDirections:UIPopoverArrowDirectionDown animated:YES]; } } } - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { [imgPickerPopOver dismissPopoverAnimated:YES]; pickedImageView.image = image; [self valueChanged:nil]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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