//
//  MPLauncherAppDelegate.m

#import "MPLauncherAppDelegate.h"
#import "MPTabBarController.h"

@interface MPLauncherAppDelegate ()

@property (nonatomic, strong) UINavigationController* naVC;
@property (nonatomic, strong) UIViewController *rootController;

@end

@implementation MPLauncherAppDelegate

- (id)init
{
    self = [super init];
    if (self)
    {
        UIViewController* tab1ViewController = (UIViewController *) [self createLoggingViewController:@"DemoViewController"];
        self.naVC = [[UINavigationController alloc] initWithRootViewController:tab1ViewController];
        self.rootController = tab1ViewController;
    }
    return self;
}

- (id)createLoggingViewController:(NSString *)className
{
    id vc;
    Class cl = NSClassFromString(className);
    if (cl != Nil) {
        vc = [[cl alloc]init];
    }
    else {
        vc = (DTViewController *)[[DTViewController alloc] init];
    }
    return vc;
}


- (UIViewController *)rootControllerInApplication:(DTMicroApplication *)application
{
    return self.rootController;
}

- (void)applicationDidFinishLaunching:(DTMicroApplication *)application
{

}

- (void)application:(DTMicroApplication *)application willResumeWithOptions:(NSDictionary *)launchOptions
{

}

@end
