Created
December 3, 2009 16:51
-
-
Save quique123/248326 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
// | |
// P3ScratchAppDelegate.m | |
// P3Scratch | |
// | |
// Created by Marcio Valenzuela on 10/30/09. | |
// Copyright Personal 2009. All rights reserved. | |
// | |
#import "P3ScratchAppDelegate.h" | |
@implementation P3ScratchAppDelegate | |
@synthesize window; | |
- (void)applicationDidFinishLaunching:(UIApplication *)application { | |
//ADD PARENT TABBAR VIEWCONTROLLER | |
tabBarController = [[UITabBarController alloc] init]; | |
//CREATE NAVIGATIONCONTROLLER FOR FIRST TAB CHILD | |
navigationController = [[UINavigationController alloc] init]; | |
//CREATE FIRST TAB CHILD | |
PersonListViewController *personController = [[PersonListViewController alloc] initWithStyle:UITableViewStylePlain]; | |
[navigationController pushViewController:personController animated:NO]; | |
personController.title = @"Personal TimeLine"; | |
personController.tabBarItem.image = [UIImage imageNamed:@"presence-icon.png"]; | |
//CREATE SECOND TAB CHILD | |
PublicTimelinesViewController *publicViewController = [[PublicTimelinesViewController alloc] init]; | |
publicViewController.title = @"Public TimeLine"; | |
publicViewController.tabBarItem.image = [UIImage imageNamed:@"all.png"]; | |
//Heres the parent adding children | |
tabBarController.viewControllers = [NSArray arrayWithObjects:navigationController, publicViewController,nil]; | |
splashView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; | |
splashView.image = [UIImage imageNamed:@"Default.png"]; | |
[window addSubview:splashView]; | |
[window bringSubviewToFront:splashView]; | |
//ADD TABBAR TO WINDOW | |
[window addSubview:tabBarController.view]; | |
// Override point for customization after application launch | |
[window makeKeyAndVisible]; | |
[splashView removeFromSuperview]; | |
[splashView release]; | |
[PublicTimelinesViewController release]; | |
[personController release]; | |
[navigationController release]; | |
} | |
- (void)dealloc { | |
[window release]; | |
[tabBarController release]; | |
[super dealloc]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment