title: Fullscreen: AVPlayerLayer is not resized when resizing its parent view
body: <p>I am developing a video player with the AVPlayer API from AV Foundation in MonoTouch (but a solution in objective-c could be nice too). I am trying to implement a fullscreen mode. </p>
  
  <p>To display the video frames, I have a UIView (let's call it playback view) where I added the AVPlayerLayer as subview of the  playback view layer:</p>
  
  <pre><code>UIView *playbackView = ...
  AVPlayerLayer *playerLayer = ...
  [playbackView.layer addSublayer:playerLayer];
  </code></pre>
  
  <p>the layer properties are set like that:</p>
  
  <pre><code>playerLayer.needsDisplayOnBoundsChange = YES;
  playbackView.layer.needsDisplayOnBoundsChange = YES;
  </code></pre>
  
  <p>to be sure that they are resized if the playback view size is changed. Initially, the playback view has the coordinates (0, 0, 320, 180) (only displayed at the top of the UI). Then, I am doing a fullscreen animation by setting the playback view frame size as being the window size:</p>
  
  <pre><code>playbackView.frame = playbackView.window.bounds;
  </code></pre>
  
  <p>It's works fine. The playback view is now filling all the window (set a background  color to see it). But my AVPlayerLayer is still staying at the top of the view like previously in non-fullscreen mode.</p>
  
  <p>Why the AVPlayer layer is not resized according to the playback view new size? Do I need to make an animation on the AVPlayerLayer as well? A refresh with setNeedsLayout, layoutSubviews (it doesn't seems to change something...)? Remove the AVPlayerLayer and add it again?</p>