I am making an application but I'm still a beginner and I'm trying to get used to the RootViewController and how it should be set.
At the beginning my application launches, I want there to be a View which is not in my tabBarController (which is set to be my rootViewController).
What I am trying to ask is, Can I have another view which is outside my UITabBarController launch first without it being in the tabBarController's items list?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
FacebookFeedViewController *facebookClass = [[FacebookFeedViewController alloc] initWithNibName:@"FacebookFeedViewController" bundle:nil];
TwitterFeedViewController *twitterClass = [[TwitterFeedViewController alloc] initWithNibName:@"TwitterFeedViewController" bundle:nil];
LinkedInFeedViewController *linkClass = [[LinkedInFeedViewController alloc] initWithNibName:@"LinkedInFeedViewController" bundle:nil];
FTLFullFeedViewController *masterClass = [[FTLFullFeedViewController alloc] initWithNibName:@"FTLFullFeedViewController" bundle:nil];
/// tab button title
facebookClass.title = @"Facebook";
twitterClass.title = @"Twitter";
linkClass.title=@"LinkedIn";
masterClass.title=@"FTL";
// tab button Images
facebookClass.tabBarItem.image = [UIImage imageNamed:@"facebook_32"];
twitterClass.tabBarItem.image = [UIImage imageNamed:@"twitter_32"];
WelcomeViewController *welcomeClass= [[WelcomeViewController alloc] initWithNibName:@"WelcomeViewController" bundle:nil];
navController = [[ UINavigationController alloc] initWithRootViewController:welcomeClass];
UINavigationController *navController2 = [[UINavigationController alloc] initWithRootViewController:facebookClass];
UINavigationController *navController3 = [[UINavigationController alloc] initWithRootViewController:twitterClass];
UINavigationController *navController4 = [[UINavigationController alloc] initWithRootViewController:linkClass];
UINavigationController *navController5 = [[UINavigationController alloc] initWithRootViewController:masterClass];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:navController,navController5,navController2,navController3,navController4,nil];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
return YES;
}