2

我尝试使用适用于 iPad 的 iphoneos-screen-mirroring 镜像一个简单的新 TabBarApplication 的屏幕:

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

每次(也不包括代码)如果我尝试在模拟器模式下激活电视输出,应用程序就会崩溃而没有错误。

如果外部电视输出被激活,它会保持黑色(包含代码)。

应用委托:

#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 回答