Created
May 6, 2012 07:14
-
-
Save wjlafrance/2620730 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ExternalViewController.m | |
// | |
// Created by William LaFrance. | |
// Public Domain | |
// | |
#import "ExternalViewController.h" | |
@interface ExternalViewController () | |
@property (strong, nonatomic) UIWindow *externalWindow; | |
@end | |
@implementation ExternalViewController | |
@synthesize externalWindow = _externalWindow; | |
- (id)init | |
{ | |
self = [super init]; | |
if (self) { | |
NSAssert([UIScreen screens].count > 1, @"No external display"); | |
self.externalWindow = [[UIWindow alloc] init]; | |
self.externalWindow.screen = [[UIScreen screens] lastObject]; | |
self.externalWindow.rootViewController = self; | |
[self.externalWindow makeKeyAndVisible]; | |
} | |
return self; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment