Created
September 20, 2012 09:03
-
-
Save hartbit/3754787 to your computer and use it in GitHub Desktop.
This file contains 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
#import "HDAppDelegate.h" | |
#import "HDViewController.h" | |
@interface HDAppDelegate () | |
@property (nonatomic, strong) HDViewController* viewController; | |
@end | |
@implementation HDAppDelegate | |
@synthesize window = _window; | |
@synthesize viewController = _viewController; | |
#pragma mark - Properties | |
- (UIWindow*)window | |
{ | |
if (_window == nil) | |
{ | |
CGRect frame = [[UIScreen mainScreen] bounds]; | |
UIWindow* window = [[UIWindow alloc] initWithFrame:frame]; | |
[self setWindow:window]; | |
[window setRootViewController:[self viewController]]; | |
} | |
return _window; | |
} | |
- (HDViewController*)viewController | |
{ | |
if (_viewController == nil) | |
{ | |
HDViewController* viewController = [HDViewController new]; | |
[self setViewController:viewController]; | |
} | |
return _viewController; | |
} | |
#pragma mark - UIApplicationDelegate Methods | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
[[self window] makeKeyAndVisible]; | |
return YES; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment