0

So I have an AVPlayerLayer that I want to rotate when the user turns the device landscape and go fullscreen. However, I don't want the UI behind the player to rotate with it. How do I do this?

I'm aware that each view controller specifies if it should autorotate or not and which orientations it supports. I've tried using the transform property on the view that encloses the AVPlayerLayer, but changing that messes with the player controls that are also in the view and created with auto layout.

I've also tried to remove the root view controller (which doesn't autorotate), replacing it with a view controller that does rotate and then adding the view from the original, non-rotating viewcontroller below that.

I've done a lot of searching, but it seems like they aren't up to date with iOS 10. Thanks.

Edit: To clarify the view that the video is in also has other interface elements within it.

BlueSpud
  • 1,555
  • 3
  • 19
  • 44
  • check my this [post](http://stackoverflow.com/q/43773075/6521116) and [post](http://stackoverflow.com/q/43752132/6521116) – LF00 May 16 '17 at 13:44
  • Possible duplicate of [Disabling autorotate for a single UIView](http://stackoverflow.com/questions/2191522/disabling-autorotate-for-a-single-uiview) – Satish Babariya May 16 '17 at 15:41

1 Answers1

0

You can follow this guide in link below http://www.sebastianborggrewe.de/only-make-one-single-view-controller-rotate/

Satish Babariya
  • 3,062
  • 1
  • 15
  • 29