title: Custom button in AVPlayerViewController.ContentOverlayView
body: <p>I need to add a custom button to the AVPlayerViewController that will appear in both fullscreen and non-fullscreen for an app running iOS 8.  </p>
  
  <p>Adding a button to the AVPlayerViewController.view or the containing view will work for non-fullscreen but when the player switches to fullscreen the button is no longer visible.  I have found that if I add a button to the AVPlayerViewController.ContentOverlayView then it appears in fullscreen and non-fullscreen, but then it doesn't appear that the ContentOverlayView responds to any touches so the button cannot be clicked.  Does anyone know of a different place to add the button or a way to make the ContentOverlayView respond to touches?</p>
  
  <p>Example Code</p>
  
  <pre><code>AVPlayerViewController *playerView = [[AVPlayerViewController alloc] init];
  playerView.player = [AVPlayer playerWithURL:movieURL];
  CGRect viewInsetRect = CGRectInset ([self.view bounds],
                                      kMovieViewOffsetX,
                                      kMovieViewOffsetY );
  /* Inset the movie frame in the parent view frame. */
  [[playerView view] setFrame:viewInsetRect];
  [self.view addSubview: [playerView view]];
  
  UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  btn.backgroundColor = [UIColor yellowColor];
  btn.frame = CGRectMake(50, 50, 200, 75);
  [btn addTarget:self action:@selector(didSelectButton:) forControlEvents:UIControlEventTouchUpInside];
  [btn setUserInteractionEnabled:YES];
  [btn setEnabled:YES];
  
  [playerView.contentOverlayView addSubview:btn];
  </code></pre>