これが私のコードです。ナビゲーションコントローラーにボタンを追加できません。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
UIViewController *viewController1, *viewController2, *viewController3,*viewController4;
viewController1 = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
viewController2 = [[DisplayAllImagesController alloc] initWithNibName:@"DisplayAllImagesController" bundle:nil];
viewController3 = [[EmptyView alloc] initWithNibName:@"EmptyView" bundle:nil];
viewController4 = [[ListView alloc] initWithNibName:@"ListView" bundle:nil];
self.tabBarController = [[UITabBarController alloc] init];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController2, viewController1, viewController3, viewController4, nil];
self.tabBarController.title = @"Title";
self.navController = [[UINavigationController alloc]
initWithRootViewController:self.tabBarController];
self.window.rootViewController = self.navController;
[self.window makeKeyAndVisible];
return YES;
}
だから、ナビゲーションコントローラーにボタンを追加する方法を教えてください...お願いします...