アプリデリゲートで次のコードを使用しました。しかし、ナビゲーション コントローラーの setTitle 関数でエラーが発生しています。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
UIViewController* viewController3=[[ThirdViewController alloc]initWithNibName:@"ThirdViewController" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2,viewController3, nil];
NavigationViewController* navigationViewController=[[NavigationViewController alloc]initWithRootViewController:self.tabBarController];
self.navigationItem.title=@"news";
self.window.rootViewController = navigationViewController;
[self.window makeKeyAndVisible];
return YES;
}