title: AVPictureInPictureController - Custom PopOver Doesnt display
body: <p>I have used  AVPictureInPictureController in AVPPlayer and initialized it as AVPlayerLayer. </p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame contentURL:(NSURL*)contentURL
  {
      self = [super initWithFrame:frame];
      if (self) {
  
          AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:contentURL];
          self.moviePlayer = [AVPlayer playerWithPlayerItem:playerItem];
          playerLayer = [AVPlayerLayer playerLayerWithPlayer:self.moviePlayer];
  
          if ([AVPictureInPictureController isPictureInPictureSupported])
          {
              self.avVPictureInPictureController = [[AVPictureInPictureController alloc] initWithPlayerLayer:playerLayer];
          }
  
  
          [playerLayer setFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
  
  
          [self.moviePlayer seekToTime:kCMTimeZero];
          [self.layer addSublayer:playerLayer];
  
  
          self.contentURL = contentURL;
  
          [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerFinishedPlaying) name:AVPlayerItemDidPlayToEndTimeNotification object:playerItem];
  
          [self initializePlayer:frame];
      }
      return self;
  }
  </code></pre>
  
  <p>Now when I try to present <a href="https://github.com/alvises/FPPopover" rel="nofollow">FPPopoverController</a> ( a custom class to present PopOvers on iPhone and iPad ) it doesn't show on the screen.</p>
  
  <p>I use the following code to present FPPopOverController</p>
  
  <pre><code>//That's how I call
  
   self.audioSubtitlePopoverController.presentPopoverFromPoint(point)
  
  
  //Definition of presentPopoverFromPoint  
  
  -(void)presentPopoverFromPoint:(CGPoint)fromPoint
  {
      self.origin = fromPoint;
  
      //NO BORDER
      if(self.border == NO)
      {
          _viewController.title = nil;
          _viewController.view.clipsToBounds = YES;
      }
  
      _contentView.relativeOrigin = [_parentView convertPoint:fromPoint toView:_contentView];
  
      [self.view removeFromSuperview];
      NSArray *windows = [UIApplication sharedApplication].windows;
      if(windows.count &gt; 0)
      {
            _parentView=nil;
          _window = [windows objectAtIndex:0];
          //keep the first subview
          if(_window.subviews.count &gt; 0)
          {
              _parentView = [_window.subviews lastObject];
  
              NSLog(@"%@ %@",_parentView,_viewController);
              [_parentView addSubview:self.view];
              [_viewController viewDidAppear:YES];
              [self.view bringSubviewToFront:_parentView];
  
          }
  
     }
      else
      {
          [self dismissPopoverAnimated:NO];
      }
  
  
  
      [self setupView];
      self.view.alpha = 0.0;
      [UIView animateWithDuration:0.2 animations:^{
  
          self.view.alpha = self.alpha;
      }];
  
      [[NSNotificationCenter defaultCenter] postNotificationName:@"FPNewPopoverPresented" object:self];
  
      //navigation controller bar fix
      if([_viewController isKindOfClass:[UINavigationController class]])
      {
          UINavigationController *nc = (UINavigationController*)_viewController;
          UINavigationBar *b = nc.navigationBar;
          CGRect bar_frame = b.frame;
          bar_frame.origin.y = 0;
          b.frame = bar_frame;
      }
  }
  </code></pre>
  
  <p>Even present from view doesn't work too</p>
  
  <pre><code>self.audioSubtitlePopoverController.presentPopoverFromView(self.view)
  // Definition of presentPopoverFromView
  -(void)presentPopoverFromView:(UIView*)fromView
  {
      SAFE_ARC_RELEASE(_fromView);
      _fromView = SAFE_ARC_RETAIN(fromView);
      [self presentPopoverFromPoint:[self originFromView:_fromView]];
  }
  </code></pre>
  
  <p>Can anyone please assist. Would be grateful.</p>