AppDelegate.m
//
// AppDelegate.m
// Task5
//
// Created by lyb on 14-9-27.
// Copyright (c) 2014年 imac. All rights reserved.
//
#import "AppDelegate.h"
#import "FirstViewController.h"
#import "SecondViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
FirstViewController *firstCtrl = [[FirstViewController alloc] init];
SecondViewController *secondCtrl =[[SecondViewController alloc] init];
UINavigationController *navCtrl1 = [[UINavigationController alloc] initWithRootViewController:firstCtrl];
UINavigationController *navCtrl2 = [[UINavigationController alloc] initWithRootViewController:secondCtrl];
UITabBarController *tabbarCtrl = [[UITabBarController alloc] init];
tabbarCtrl.viewControllers = @[navCtrl1, navCtrl2];
self.window.rootViewController = tabbarCtrl;
return YES;
}
@end
//
// AppDelegate.m
// Tas