2

I need to have my iPad application mirrored on an external screen exactly the way it runs on the device but after a certain period of inactivity the external screen should display a static image until the device receives touch input again. I've read a lot about handling multiple screens in iOS today but couldn't find a solution.

Is it possible to achieve something like that and if yes, how?

matteok
  • 2,189
  • 3
  • 30
  • 54

1 Answers1

0

Summarized in one sentence: You can use UIViews on external screens like on the main screen.

Quote of the Displaying Content on an External Display section from Apple View Programming Guide

The process for displaying content on an external display is described in the following sections. However, the following steps summarize the basic process:

  1. At application startup, register for the screen connection and disconnection notifications.
  2. When it is time to display content on the external display, create and configure a window. Use the screens property of UIScreen to obtain the screen object for the external display. Create a UIWindow object and size it appropriately for the screen (or for your content). Assign the UIScreen object for the external display to the screen property of the window. Adjust the resolution of the screen object as needed to support your content. Add any appropriate views to the window.
  3. Show the window and update it normally.

The developer documents by Apple provide all required information (including samples): http://developer.apple.com/library/ios/#documentation/windowsviews/conceptual/viewpg_iphoneos/CreatingWindows/CreatingWindows.html

miho
  • 11,765
  • 7
  • 42
  • 85
  • I've already gone through this today. I know how to display a set of views on an external display but I would need to mirror the content displayed on the device. If i scroll in a UIScrollView on the device I need the scrolling to be exactly mirrored on screen – matteok Feb 22 '13 at 19:16
  • Since the external screen doesn't have the same resolution this won't give a nice result. Why not just rebuilding the screen elements and just also scrolling when the user scrolls on the main screen? http://stackoverflow.com/questions/952412/uiscrollview-scroll-to-bottom-programmatically – miho Feb 22 '13 at 19:57
  • As a last resort I will do that but I have over 10 completely different ViewControllers with several scrollviews each that need to be mirrored so this could be a lot of effort to sync each scrolling event... – matteok Feb 22 '13 at 20:01