我正在尝试构建一个以 3 个按钮开头的主视图的应用程序,然后当用户按下这些按钮中的任何按钮时,选项卡栏视图将与选定的选项卡栏项目一起出现。
我的问题在这里,当标签栏视图应该出现时......它显示为空!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
MainMenuViewController *mainMenuViewController = [[[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController" bundle:nil] autorelease];
self.navigationController = [[[UINavigationController alloc] initWithRootViewController:mainMenuViewController] autorelease];
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
return YES;
}
//主菜单视图中的按钮操作 -
(IBAction)button1Action:(id)sender {
TabbarViewController *tempView = [[TabbarViewController alloc] initWithNibName:@"TabbarViewController" bundle:nil];
[self.navigationController pushViewController:tempView animated:YES];
[tempView release];
}