Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-24-2009, 12:33 PM   #5 (permalink)
youngcoder
Banned
 
Join Date: Oct 2009
Location: East Bay, CA
Posts: 171
youngcoder is on a distinguished road
Default

Code:
  

- (void)applicationDidFinishLaunching:(UIApplication *)application 
{
	
	
	
	//put all the views into this array that you want in the tab bar:
	
	NSMutableArray *tabBarViewControllers = [[NSMutableArray alloc] init];
    UINavigationController *navigationController;
	
	//Create sales records view,navigation controller and add to array
	FirstViewController *tableviewcontroller = [[FirstViewController alloc] 
							   initWithStyle:UITableViewStyleGrouped];
	navigationController = [[UINavigationController alloc] init];
	navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
	[navigationController pushViewController:tableviewcontroller animated:NO];
	[tableviewcontroller release];
	[tabBarViewControllers addObject:navigationController];
	[navigationController release];
	
	//Create view and add to array
FirstViewController *vc = [[FirstViewController alloc] 
					initWithNibName :nil bunle:nil];

	 [tabBarViewControllers addObject:vc];
	[vc release];
	
	//Create the tab bar controller and add the views you created above
	UITabBarController *tabBarController = [[UITabBarController alloc] init];
	[tabBarController setViewControllers:tabBarViewControllers animated:NO];
	[tabBarViewControllers release];
	
	//Add the tab bar view to the window
	[window addSubview:tabBarController.view];
	
    // Override point for customization after application launch
    [window makeKeyAndVisible];
}
youngcoder is offline   Reply With Quote
 

» Advertisements
» Online Users: 516
19 members and 497 guests
Apptronics RBC, chiataytuday, daunmi, DaveDee, dhun, Duncan C, HemiMG, HowEver, ilmman, jmorregoc, LEARN2MAKE, Libera, mariano_donati, mediaspree, newprogrammer, oceanlablight, Speed, tommiss12
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,318
Threads: 93,991
Posts: 402,423
Top Poster: BrianSlick (7,978)
Welcome to our newest member, Libera
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:16 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.