Tom Bates
Tom Bates

Reputation: 576

iPhone/ iPad app development TV Out

HI,

I have just submitted my first application to iTunes for approval, however, there is one thing I really want to add to it ASAP.

I would like to code into an app that it can use the TV Out functions of both the iPhone and iPad? Ideally it would work in a similar way to how keynote works i.e. you see a bit more on the iPad itself than is projected on the TV, but even just mirroring the screen would be a step in the right direction.

I have searched all over for this and all I keep getting is about downloading jailbreaks for you iPhone to mirror the screen, which doesn't really help.

Thanks in advance,

Upvotes: 2

Views: 2656

Answers (4)

robterrell
robterrell

Reputation: 756

If you just want to mirror, use my TVOutManager singleton. I've put up code to do this on github: https://github.com/robterrell/TVOutManager (Hmmm... I just noticed I haven't pushed the most recent code. I'll review and push new code asap.) I wrote up some detailed info about it at http://www.touchcentric.com/blog/archives/123 if you want to know the how's and why's.

Basically, just add the files to your project, and call:

   [[TVOutManager sharedInstance] startTVOut];

If you want to do more than mirroring, read the docs on UIScreen. It's fairly trivial to create a UIWindow on the external screen (steal the bits from TVOutManager if you need to) and add subviews to it. This way you could have a Keynote-like controller on the device screen, while the main display is on the external display.

Upvotes: 3

Fjölnir
Fjölnir

Reputation: 490

Mirroring is not possible.

But to draw on an external display, just get the UIScreen object for the external display, then set the screen property of a UIWindow to it, (making sure to set the frame correctly etc) everything in that window should be drawn on the respective display.

Relative links:

  • developer.apple.com/library/ios/#documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html (look at screen property)
  • developer.apple.com/library/ios/#documentation/uikit/reference/UIScreen_Class/Reference/UIScreen.html (look at +screens)

(I don't have any reputation => can't post clickable links)

Upvotes: 1

Andreyco
Andreyco

Reputation: 22862

I think, you can't do this. You can only stream videos from iPod app.
But, if you have jailbreak on your device, try this (link) or take a look at this great YouTube video (link) showing exactly what you need.

Upvotes: -4

roman
roman

Reputation: 11278

http://mattgemmell.com/2010/06/01/ipad-vga-output should get you started ...

Upvotes: 2

Related Questions