这是我的代码..我无法在导航控制器中添加按钮。
- (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;
}
所以,请让我知道如何将按钮添加到导航控制器......请......