External Display with App

Discussion in 'iOS Programming' started by newtoiphonesdk, Jul 12, 2011.

  1. newtoiphonesdk macrumors 6502a

    Jul 30, 2010
    What is needed to display an app on an external display using either VGA or HDMI adapter? Kind of like Keynote or Real Racing 2. The mirroring option on the iPad 2 isn't working for me since it doesn't take up much of the screen.
  2. ChristianVirtual, Jul 17, 2011
    Last edited: Jul 17, 2011

    ChristianVirtual macrumors 601


    May 10, 2010
    Check in documentation for class UIScreem, UIScreenMode and UIWindow.

    In UIScreen is an array with all attached screens; index 0 is the main screen. External screen on index 1.

    You can control the screen resolution with UIScreenMode.

    Finally you need to create a new UIWindow and attach it to the external screen instance. Fill the content with UIKit or CALayers or other functions.

    Debugging with the VGA cable is not possible as it can not pass through the debugger while connected. The new HDMI cable I think allow that, but not sure.

    IOS Simulator can help with the first steps; you can simulate external monitors.

    UPDATE: you can also register some notification to get informed when a screen got attached or detached.

Share This Page