title: Get picture I take with UIImagePickerController
body: <p>I'm trying to do my 1st iOS application, and I'm having some problems with obtaining the picture I just take.</p>
  
  <p>Here are my methods : </p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      //add imagePicker
      _imgPicker = [[UIImagePickerController alloc] init];
      _imgPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
      _imgPicker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
      _imgPicker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
      _imgPicker.showsCameraControls = NO;
      _imgPicker.navigationBarHidden = YES;
      _imgPicker.toolbarHidden = YES;
      _imgPicker.wantsFullScreenLayout = NO;
  
      //add overlay on imagePicker
      _imageSilhouette.image = [UIImage imageNamed:_pose.image];
      _imgPicker.cameraOverlayView = _imageSilhouette;
      [_vImagePreview addSubview:_imgPicker.view];
  }
  </code></pre>
  
  <p>When I click on a button, I have a timer, and after 10seconds, I take the picture : </p>
  
  <pre><code>- (void)decreaseTimerCount
  {
      _lblTimer.text = [NSString stringWithFormat:@"%d", --_timerCount];
      if(_timerCount==0)
      {
          [self takePicture];
      }
  }
  -(void) takePicture{
      [_timer invalidate];
      [_imgPicker takePicture];
  }
  </code></pre>
  
  <p>As I saw in Apple documentation, I added the delegate : </p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
  {
      UIImage * img = [info objectForKey:UIImagePickerControllerOriginalImage];
      _imageSilhouette.image = img;
      _imgPicker.cameraOverlayView = _imageSilhouette;
      //[picker dismissModalViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>But I don't really understand if I have to declare the imagePickerController somewhere..</p>
  
  <p>I don't understand neither if img does contain the picture I just took ?</p>
  
  <p>Could I please have some help ?</p>