TabBarController *tabBar = [[TabBarController alloc] init];
tabBar.viewControllers = vcNames; //vcNames是五个视图控制器的数组
UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:tabBar];
[nc.navigationBar setBackgroundImage:[UIImage imageNamed:@"navigationbar.png"] forBarMetrics:UIBarMetricsDefault];
nc.navigationBar.backgroundColor = [UIColor redColor];
self.window.rootViewController = nc;
[nc release];
[tabBar release];