将 iPad 屏幕镜像到 VGA

发布于 2024-09-15 12:26:10 字数 955 浏览 4 评论 0原文

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

I tried mirroring the screen of a simple new TabBarApplication with iphoneos-screen-mirroring for iPad:

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

Everytime (also without including the code) if I try to activate the TV-out in Simulator mode the app crashes without errors.

If the external TV-out is activated it staies black (code includet).

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;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

此生挚爱伱 2024-09-22 12:26:10

我看到了同样的行为。我认为它使用的技术意味着你必须在真实设备上进行测试。对我来说,在真实设备(iPad)上相同的代码运行得很好。

I saw the same behaviour. I think the technique it uses means you have to test on a real device. The same code on a real device (iPad) for me worked fine.

忆伤 2024-09-22 12:26:10

看看这里 http://www.touchcentric.com/blog/archives/123

Rob Terrell 的 TVOutManager 就是解决方案。

下一行就是您所需要的:[[TVOutManager sharedInstance] startTVOut];

Take a look here http://www.touchcentric.com/blog/archives/123

Rob Terrell's TVOutManager is the solution.

The next line is all your need: [[TVOutManager sharedInstance] startTVOut];

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文