I have TabBar based iPhone application, and in app delegate 2 default view controllers are initialized by apple (if you choose tabbar base app when creating application).
UIViewController *rootViewController = [[tabBarBetFirstViewController alloc] initWithNibName:@"tabBarBetFirstViewController" bundle:nil];
UIViewController *accountViewController = [[tabBarBetSecondViewController alloc] initWithNibName:@"tabBarBetSecondViewController" bundle:nil];
Why this isn't initialized like this:
tabBarBetFirstViewController *rootViewController = [[tabBarBetFirstViewController alloc] initWithNibName:@"tabBarBetFirstViewController" bundle:nil];
tabBarBetSecondViewController *accountViewController = [[tabBarBetSecondViewController alloc] initWithNibName:@"tabBarBetSecondViewController" bundle:nil];
???
Is that the same ? Or it's just those default that are added by apple? If i want to add one more tab will I write:
UIViewController *third = [ThirdViewController alloc].....];
or
ThirdViewController *third = [ThirdViewController alloc]....];
Of course at the end I have:
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:rootViewController, accountViewController, third, nil];