When we implemented avplayer and we dont need one of the avplayer controller i.e maximise button, So unable to hide that button.
I tried to hide maximise button using hide all controlls but individually not possible to hide.
We can hide the maximize button from getting subviews from AVPlayerViewController. In Subviews need to find the AVMobileChromelessDisplayModeControlsView class object and hide that view.
if let orientaion = playerVC.view.subviews.first?.subviews.last?.subviews.first {
orientaion.isHidden = true
}