title: 'UIPopoverController' is deprecated: first deprecated in iOS 9.0
body: <p>I have developed a project that shows error : </p>
  
  <blockquote>
    <p>'UIPopoverController' is deprecated: first deprecated in iOS 9.0 - UIPopoverController is deprecated. Popovers are now implemented as UIViewController presentations. Use a modal presentation style of UIModalPresentationPopover and UIPopoverPresentationController.</p>
  </blockquote>
  
  <p>My codings are:</p>
  
  <p>ViewController.h:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;Photos/Photos.h&gt;
  #import &lt;MobileCoreServices/MobileCoreServices.h&gt;
  
  
  
  @interface ViewController : UIViewController
   &lt;UIImagePickerControllerDelegate, UINavigationControllerDelegate&gt;
  
  - (IBAction)touch:(id)sender;
  
  @end
  
  @interface SecondView : UIViewController
  &lt;UIImagePickerControllerDelegate, UINavigationControllerDelegate&gt;
  
  
  
  //video gallery
  @property (strong,nonatomic) UIPopoverPresentationController *popOver;
  @property (weak, nonatomic) IBOutlet UIView *studentView;
  @property (strong, nonatomic) NSURL *videoURL;
  
  
  @end
  </code></pre>
  
  <p>ViewController.m:</p>
  
  <pre><code>- (void)openGallery {
  
  UIImagePickerController *Picker=[[UIImagePickerController alloc] init];
  Picker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
  Picker.mediaTypes=[[NSArray alloc] initWithObjects:(NSString *)kUTTypeMovie,  nil];
  Picker.delegate=self;
  
  if( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
  
  {
  
  
      UIPopoverController *popController=[[UIPopoverController alloc] initWithContentViewController:Picker];
      [popController presentPopoverFromRect:CGRectMake(0, 600, 160, 300) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
      self.popOver=popController;
  }
  else
  {
      [self presentViewController:Picker animated:YES completion:nil];
  }
  }
  
  
  #pragma mark - UIImagePickerControllerDelegate
  
   - (void)imagePickerController:(UIImagePickerController *)picker    didFinishPickingMediaWithInfo:(NSDictionary *)info {
  
  
  if (self.studentView) {
  
      self.videoURL = info[UIImagePickerControllerMediaURL];
      [picker dismissViewControllerAnimated:YES completion:NULL];
  
  
      [[NSUserDefaults standardUserDefaults] setObject:[self.videoURL absoluteString] forKey:@"url1"];
  }
  
  }
  </code></pre>
  
  <p>I could not proper reference for UiModalPresentationPopover. Can someone help me to solve this error. Any help is much appreciated. Thank you.</p>