title: Changing size of UIImagePicker presented via UIPopOver (iPad)
body: <p>I am trying to change the size of a UIImagePicker which I am presenting via a UIPopOver. The code is shown below. The issue is that the PopOver size doesn't display properly - it briefly flashes up in the correct size, then animates down to the usual default size.</p>
  
  <p>Can anybody advise me on how I can change the size of the popover ?</p>
  
  <pre><code>- (void)showImagePickerForPhotoLibrary {
      NSLog(@"Picker");
      imagePickerController = [[UIImagePickerController alloc] init];
      imagePickerController.delegate = self;
      imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
      imagePickerController.contentSizeForViewInPopover = CGSizeMake(768, 1000);
  
      if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
          Class cls = NSClassFromString(@"UIPopoverController");
          if (cls != nil) {
              popoverController = [[UIPopoverController alloc] initWithContentViewController:imagePickerController];
              //popoverController.popoverContentSize = CGSizeMake(768, 1000);
              [popoverController presentPopoverFromRect:selectedRect inView:self.view permittedArrowDirections:4 animated:YES];
          }
      }
      else {
          [app.mainViewController presentModalViewController:imagePickerController animated:YES];
      }   
  }
  </code></pre>