I am trying to display a full screen, 16: 9, UIViewControlleron an external display using AirPlay.
The goal here is to replace AirPlay mirroring with a custom view controller that will cover the full size of the external screen.
Everything seems to work just fine when the screen connects when the iPad is in portrait mode. When it is connected in the landscape, it is UIViewControllerdisplayed on the side of the external display and fills only half of the screen.
To do this, I add my own UIViewControllerto the attached AirPlay UIScreen.
-(void) screenConnected:(NSNotification * ) notification {
UIScreen * screen = [notification object];
UIWindow * window = [[UIWindow alloc] initWithFrame:screen.bounds];
[currentWindow setScreen:screen];
UIViewController * controller = [_delegate createControllerForAirplayDisplay:window];
[window setHidden:NO];
[window setRootViewController:controller];
}
Everything seems to be working fine, I see a full-screen display on the iPad, as well as AirPlay TV.
, AirPlay , iPad . , AirPlay UIViewController , .
, :

, , :

UIWindow UIViewController CGAffineTransformMakeRotation, , AirPlay.
Edit
Apple , rdar://20817189. , / .