2

iPad 用の iphoneos-screen-mirroring を使用して、単純な新しい TabBarApplication の画面をミラーリングしてみました。

http://code.google.com/p/iphoneos-screen-mirroring/

シミュレーター モードで TV-out をアクティブにしようとすると、毎回 (コードを含めずに) アプリがエラーなしでクラッシュします。

外部 TV 出力が有効になっている場合、黒のままになります (コードを含む)。

appDelegate:

#import "iPadVGAAppDelegate.h"
#import "UIApplication+ScreenMirroring.h"


@implementation iPadVGAAppDelegate

@synthesize window;
@synthesize tabBarController;


#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    [[UIApplication sharedApplication] setupScreenMirroringWithFramesPerSecond:20.0];

    // Add the tab bar controller's current view as a subview of the window
    [window addSubview:tabBarController.view];
    [window makeKeyAndVisible];

    return YES;
}
4

2 に答える 2

1

私は同じ行動を見ました。それが使用する手法は、実際のデバイスでテストする必要があることを意味すると思います。私にとっては、実際のデバイス (iPad) で同じコードが正常に機能しました。

于 2010-10-06T07:52:20.670 に答える
0

こちらをご覧ください http://www.touchcentric.com/blog/archives/123

Rob Terrell の TVOutManagerが解決策です。

次の行だけで十分です。 [[TVOutManager sharedInstance] startTVOut];

于 2011-05-31T09:31:49.607 に答える