title: UIImagePickerController in custom view doesn't show camera
body: <p>I'm trying to display the content of the camera in a custom view. What I just want to achieve is to have custom buttons to take pictures in order to take more than one photo at a single time.</p>
  
  <p>It should work out of the box, theoretically, but in practice sometimes it happens that if I dismiss my custom view controller and then I re-open it "quickly", the UIImagePickerController just shows a blank (black, actually) content. The funny thing is that if you try to take a picture, the camera actually is enabled and the shutter opens and you can collect the image. The only issue seems to be related to displaying the live-content into a specific UIView.</p>
  
  <p>This is the code I use for displaying it:</p>
  
  <pre><code>UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
  
  [imagePickerController setSourceType:UIImagePickerControllerSourceTypeCamera];
  [imagePickerController setShowsCameraControls:NO];
  [imagePickerController setEditing:NO];
  [imagePickerController setNavigationBarHidden:YES];
  
  [imagePickerView addSubview:[imagePickerController view]];
  [imagePickerController viewWillAppear:YES];
  </code></pre>
  
  <p>I don't like that <code>viewWillAppear</code> method call but it is the only way I found in order to show it.
  <code>imagePickerView</code> is, indeed, the view that I have previously created to place the picker into.</p>
  
  <p>By digging a little bit the problem myself, I noticed that if I wait a couple of seconds before re-opening my custom view controller, the picker shows up normally.</p>
  
  <p>By taking a look into the console it seems that the picker (or the camera resource associated to it) is actually released after a while but this is just a guess.</p>
  
  <p>Any clue? Thanks</p>