title: UIImagePickerController saving file path iOS/iPhone
body: <p>Using the below code I am trying to save the video file path only(don't want to run it or open the media player view). </p>
  
  <p>The issue is when I click on the video thumbnail in picker controller, it automatically opens the video in media player view. While I just want to have its path to be save and then I want to use it when the the user will press the play button.</p>
  
  <p>Let me explain a little more, I have 2 views, On MainView I have 2 buttons, 1 button OPEN for opening the <code>UIImagePickerController</code> and selecting the video, and 1 button PLAY for playing the same selected video. What I am trying to do here is that, when user clicks on OPEN button <code>UIImagePickerController</code> should be opened and user should be able to select the video, when user clicks on video thumbnail <code>UIImagePickerController</code> should be dismissed and <code>MainView</code> (where open and play buttons are) should be opened. Then if user wants to play the movie, he would click on the PLAY button and watch the movie. </p>
  
  <p>But here in this code, when I click on the movie thumbnail in <code>UIImagePickerController</code>, it navigates to the media viewer.</p>
  
  <pre><code>- (IBAction)openPicker:(id)sender {
  
      mediaPickerController = [[UIImagePickerController alloc] init];
      NSArray *types = [UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerQualityTypeHigh];
      mediaPickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
      mediaPickerController.delegate = self;
      mediaPickerController.mediaTypes = types;
      mediaPickerController.videoQuality = UIImagePickerControllerQualityTypeHigh;
      mediaPickerController.delegate = nil; 
  
     [self presentModalViewController:mediaPickerController animated:YES]; 
  
  
  }
  
  - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
  {
  
      videoPath = [info objectForKey:UIImagePickerControllerMediaURL];
      NSLog(@"videoPath: %@", videoPath);
      [[picker parentViewController] dismissModalViewControllerAnimated:YES];
  
  }
  </code></pre>