我尝试使用适用于 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;
}