title: Display UIImagePickerViewController for uiimagepickercontrollersourcetypephotolibrary from UIActionSheet in IPad
body: <p>I have a <code>UIActionSheet</code> which has options to choose image from Camera or photo library. For this I took <strong>imagePickerViewController</strong>. For camera it works absolutely fine. But not for photo library.  </p>
  
  <pre><code>-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
  
      if (buttonIndex == 0) 
      {
  
          imgController = [[UIImagePickerController alloc] init];
          imgController.allowsEditing = YES;
          imgController.sourceType =  UIImagePickerControllerSourceTypeCamera;   
          imgController.delegate=self;
          [self presentModalViewController:imgController animated:YES];
  
      } 
      else if (buttonIndex == 1) 
      {
  
          if ([self.popoverController isPopoverVisible]) {
              [self.popoverController dismissPopoverAnimated:YES];
              [popoverController release];
          } else {
              if ([UIImagePickerController isSourceTypeAvailable:
                   UIImagePickerControllerSourceTypeSavedPhotosAlbum])
              {
                  UIImagePickerController *imagePicker =
                  [[UIImagePickerController alloc] init];
                  imagePicker.delegate = self;
                  imagePicker.sourceType =
                  UIImagePickerControllerSourceTypePhotoLibrary;
                  imagePicker.allowsEditing = NO;
  
                  self.popoverController = [[UIPopoverController alloc]
                                            initWithContentViewController:imagePicker];
  
                  self.popoverController.delegate = self;
  
                  [self.popoverController setPopoverContentSize:CGSizeMake(500, 500)];
  
                  [self.popoverController presentPopoverFromRect:self.view.frame 
                                                            inView:self.view
                                          permittedArrowDirections:UIPopoverArrowDirectionAny 
                                                          animated:YES];
  
  
                  [imagePicker release];
              }
          }
  
  
      } 
  
  }  
  </code></pre>
  
  <p>On touching photo library option a small <strong>popupViewController</strong> is created on top of view but it is very small. Why the <strong>popupViewController</strong> is too small? Is there some other way to for displaying <code>UIImagePickerViewController</code> for <code>uiimagepickercontrollersourcetypephotolibrary</code>?</p>