简体   繁体   English

TVOutManager 在模拟器上工作,但不在设备上?

[英]TVOutManager working on Simulator, but not on a device?

I am trying to project my iPhone app on an external display.我正在尝试将我的 iPhone 应用程序投影到外部显示器上。 I tried TVOutManager, It works perfect on the simulator (I turned on the TV Out Option, and have tested iOS from 4.0 to 4.3).我尝试了 TVOutManager,它在模拟器上完美运行(我打开了 TV Out 选项,并测试了从 4.0 到 4.3 的 iOS)。 However, when I install the app on my iPhone4, it doesn't work neither on an external display nor on a TV.但是,当我在我的 iPhone4 上安装该应用程序时,它既不能在外部显示器上运行,也不能在电视上运行。 Am I missing something or there are some special requirements for the cable or accessory?我是否遗漏了什么或者对电缆或配件有一些特殊要求?

#import "TVOutManager.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 
    [[TVOutManager sharedInstance] startTVOut];
    .....
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    [[TVOutManager sharedInstance] startTVOut];
}

Thanks谢谢

Make sure to use a high quality VGA-cable, or a short one.确保使用高质量的 VGA 电缆或较短的电缆。 Short one is better of course.短的当然更好。

Trick to make it work, when it's not:让它工作的技巧,当它不是:

  1. Connect projector cable连接投影仪电缆
  2. Open app打开应用
  3. All well?一切安好? Stop and pet your back, if not continue:停下来抚摸你的背部,如果不继续:
  4. Kill the application with a double-home-button-death-tap使用双主页按钮死亡点击杀死应用程序
  5. Restart the application (with the cable still connected)重新启动应用程序(仍然连接电缆)

This usually solves the problem for us, step 3-5 might need some iterations.这通常可以为我们解决问题,步骤 3-5 可能需要一些迭代。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM