title: How to get a copy of the image from UIImagePicker
body: <p>I've got a very simple app where the user selects a <code>UIImageView</code> and presses a button to take a photo with the camera. The image is then returned and displayed in the <code>UIImageView</code>.</p>
  
  <p>However, since the <code>UIImageViews</code> are sharing the same delegate, when there's already an image in one of the <code>UIImageViews</code>, and I go to take a photo to be placed in another, the previous <code>UIImageView</code> is replaced with empty content (i.e. no image). I guess this is because they're sharing the same delegate. Is there any way I can essentially copy the image instead of referencing the delegate version of it?</p>
  
  <p>Here's some sample code:</p>
  
  <pre><code>    - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo {
  [picker.parentViewController dismissModalViewControllerAnimated:YES];
  
  if (topView == YES)
  {
      NSLog(@"topView = %i", topView);
      imageView.image = image;
  }
  else {
      NSLog(@"topView = %i", topView);
      imageView2.image = image;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Thanks!</p>
  
  <p>Edit: Here's the code that gets called by the IBAction on the button presses</p>
  
  <pre><code>- (IBAction) pushPick {
      topView = YES;
      UIImagePickerController *picker = [[UIImagePickerController alloc] init];
      picker.delegate = self;
      picker.sourceType = UIImagePickerControllerSourceTypeCamera;
      [self presentModalViewController:picker animated:YES];
      [picker release];
  }
  - (IBAction) pushPick2 {
      topView = NO;
      UIImagePickerController *picker = [[UIImagePickerController alloc] init];
      picker.delegate = self;
      picker.sourceType = UIImagePickerControllerSourceTypeCamera;
      [self presentModalViewController:picker animated:YES];
      [picker release];
  }
  </code></pre>