My app supports HDMI Output.
I asked the code for the resolution of the TV and got 1920 x 1080 px for
externalScreen.bounds
OK, everyth
externalScreen.overscanCompensation = UIScreenOverscanCompensationInsetApplicationFrame;
The home screen will have black bars because the aspect ratio doesn't match 16:9 (it's 4:3 I think). As far as the external display, check the frame of your main view (the view that's supposed to span the screen). It is probably not set to 1920 x 1080
edit: I used this code for a project where I had to output from an iPad to a 1920 x 1080 display and it worked
- (void) screenDidConnect:(NSNotification *)aNotification
{
NSLog(@"A new screen got connected: %@", [aNotification object]);
//[self printScreenInfo];
UIScreen* newScreen = [aNotification object];
CGRect screenBounds = newScreen.bounds;
if (!self.externalWindow)
{
self.externalWindow = [[UIWindow alloc] initWithFrame:screenBounds];
self.externalWindow.screen = newScreen;
self.externalViewController.view.frame = externalWindow.frame;
[self.externalWindow addSubview:externalViewController.view];
self.externalWindow.hidden = NO;
// Set the initial UI for the window.
// [externalViewController displaySelectionInSecondaryWindow:externalWindow];
}
}
The setting that works best for most TVs is:
externalScreen.overscanCompensation = UIScreenOverscanCompensationInsetBounds | UIScreenOverscanCompensationInsetApplicationFrame; // this is the same as setting it to 3
Just setting it to UIScreenOverscanCompensationInsetApplicationFrame can cause misalignment of the UIWindow contents.