title: Dismiss UIImagePickerController
body: <p>I have tried every variation of dismissing a UIImagePickerController with out any luck. What am i doing wrong.</p>
  
  <pre><code>- (IBAction)choosePhoto
  {
      self.picker = [[UIImagePickerController alloc] init];
      self.picker.delegate = self;
      self.picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
      [self presentModalViewController:self.picker animated:YES];
  
  }
  
  - (void)imagePickerControllerDidCancel:(UIImagePickerController *)imagePicker
  {
      NSLog(@"dismiss image picker");
      [self dismissModalViewControllerAnimated:NO];
      [[self.picker parentViewController] dismissModalViewControllerAnimated:NO];
      [self.presentedViewController dismissModalViewControllerAnimated:NO];
      [self.presentingViewController dismissModalViewControllerAnimated:NO];
       // And every other way i could think of
  }
  
  - (void)imagePickerController:(UIImagePickerController *)imagePicker didFinishPickingMediaWithInfo:(NSDictionary *)info
  {
      .. same stuff here
  }
  </code></pre>
  
  <p>I have tried to present the picker from the parent, grandparent, navigationController and root controller and nothing works. What ever i do i cant dismiss the ImagePickerController.</p>
  
  <p>Please note the log statement gets called every time.</p>
  
  <p>Cheers</p>