设置它在你的应用程序代理:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
[[NSBundle mainBundle] loadNibNamed:@"TabBarController" owner:self options:nil];
self.window.rootViewController = tbc;
return YES;
}
与tabcontroller创建厦门国际银行,下降标签栏里面的导航控制器。 设置Viewcontroller的类和笔尖名称。
里面的按钮的方法,需要像:
- (IBAction)go:(id)sender
{
Primeiro2ViewController *p2vc = [[Primeiro2ViewController alloc] initWithNibName:@"Primeiro2ViewController" bundle:nil];
p2vc.title = @"Primeiro 2";
[self.navigationController pushViewController:p2vc animated:YES];
self.navigationController.navigationBar.tintColor = [UIColor greenColor];
}
如果你需要一个样品,我后来上传你。
thx回复,但它不是我所需要的...我将再次解释它。 我有一个视图控制器(称为ViewControlllerMAIN)和第二个NavigationController(称为RootViewController)。在AppDelgate中,我将它们拆分为一个“tbc”TabBarController,并且一切都很好,但是我需要为usnig应用程序添加一些“提示”,并且我想用ViewControllerMAIN中的按钮启动它。当我这样做,它的工作,但是,当我想回到ViewContollerMAIN(我使用它模式切换)Tabbar消失...所以是任何可能性,我该怎么做?谢谢! :-) – stepik21 2013-03-25 20:14:27