How to enable video output to iPad app?

It just turned out that the iPad video output is not system level functionality, but it must be explicitly built into every application. Does anyone have any experience that can point me to a sample code? The secondary question is why Apple does not make this a system feature. Is this a hardware issue that I should know about when creating this application in my application?

+3
source share
4 answers

Sorry, I don't seem to need to stand to comment on other posts. So, here is some code that may be useful for exploring the new external display support:

    NSUInteger numScreens = [[UIScreen screens] count];
DLog(@"[[UIScreen screens] count] = %d", numScreens);
NSUInteger j = 0;
for (UIScreen *screen in [UIScreen screens])
    {
    DLog(@" screen %d", j++);
    NSArray *modes = [screen availableModes];
    for (int i = 0; i < [modes count]; ++i)
        {
        UIScreenMode *mode = [modes objectAtIndex:i];
        DLog(@"  modes[%d] : size = (%f, %f) ; aspect ration = %f", i, mode.size.width, mode.size.height, mode.pixelAspectRatio);
        }
    }

, - - . Apple Component AV Cable. , , USB 30- , iPhone/iPad .

, , , iPhone/iPad. .

0

iPad . . , , UIKit. .

  • UIScreen ( ). , , .

  • UIScreenMode .

  • Windows ( UIWindow) .

+1

The TVOutManager class handles the entire process.

Here is the info: http://www.touchcentric.com/blog/archives/123

And github: https://github.com/robterrell/TVOutManager

0
source

This discussion is now less relevant, since in current versions of iOS, mirroring is now supported at the system level.

0
source

Source: https://habr.com/ru/post/1739964/


All Articles