フォグマイスターの答えはそれほど正確ではないので、チャイムを鳴らしたい.
ミラーリングを簡単に使用でき、Apple-TV 画面にさまざまなコンテンツを表示できます。私が知る限り、現時点で Apple のパブリック API でサポートされている唯一の方法です。解決策は、他の場所の中でもここで詳しく説明されています。
アイデアは、外部ウィンドウをハイジャックし、(他のものと同様に) あなたが制御する viewController をそれに与えることです:
if([[UIScreen screens] count] > 1){
UIScreen *secondScreen = [[UIScreen screens] objectAtIndex:1];
_secondWindow = [[UIWindow alloc] initWithFrame:secondScreen.bounds];
self.secondWindow.screen = secondScreen;
_externalViewController = [[YourExternalViewControllerClass alloc] init];
self.secondWindow.rootViewController = self.externalViewController;
self.secondWindow.hidden = NO;
}
上記の例では、インスタンス_secondWindow
と_externalViewController
インスタンスは、デバイス ビューを設定する viewController のプロパティです。