Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use UIImagePickerController in iPad?
    primarykey
    data
    text
    <p>Hi i am working on a universal application (iPhone/iPad). one feature is that i have to select a photo from album and show it on UIImageView.</p> <p>Now problem is that it is working good on iPhone but when i try to open photo album it crashes. my code in action sheet delegate is this:</p> <pre><code>- (void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ if ( ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])) { if (buttonIndex == 0) { [self lockAllImagesOnTheScreen]; imagePicker.sourceType=UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:imagePicker animated:YES]; } if (buttonIndex == 1) { [self lockAllImagesOnTheScreen]; imagePicker.sourceType= UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:imagePicker animated:YES]; } } else { if (buttonIndex == 0) { [self lockAllImagesOnTheScreen]; imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; imagePicker.sourceType= UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:imagePicker animated:YES]; } } } else{ if ( ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])) { if (buttonIndex == 0) { [self lockAllImagesOnTheScreen]; imagePicker.sourceType=UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:imagePicker animated:YES]; } if (buttonIndex == 1) { [self lockAllImagesOnTheScreen]; imagePicker.sourceType= UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:imagePicker animated:YES]; } } else { if (buttonIndex == 0) { [self lockAllImagesOnTheScreen]; imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; imagePicker.sourceType= UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:imagePicker animated:YES]; } } } } </code></pre> <p>can any body help me out? i have checked on stackOverflow and also googled it but in vain.</p>
    singulars
    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.
 

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