tabbar + navigation 架构appdelegate的配置方法(类似weibo,网易新闻)

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];

    // Override point for customization after application launch.

UINavigationController *HomeNav = [[UINavigationController alloc] initWithRootViewController:[[HomeController alloc] init]];

UINavigationController *LifeNav = [[UINavigationController alloc] initWithRootViewController:[[LifeController alloc] init]];

UINavigationController *InfoNav = [[UINavigationController alloc] initWithRootViewController:[[InfoController alloc] init]];

UINavigationController *BBSNav = [[UINavigationController alloc] initWithRootViewController:[[BBSController alloc] init]] ;

UINavigationController *MoreNav = [[UINavigationController alloc] initWithRootViewController:[[MoreController alloc] init]];


[HomeNav.navigationBar setTintColor:[UIColor clearColor]];

[LifeNav.navigationBar setTintColor:[UIColor clearColor]];

[InfoNav.navigationBar setTintColor:[UIColor clearColor]];

[BBSNav.navigationBar setTintColor:[UIColor clearColor]];

[MoreNav.navigationBar setTintColor:[UIColor clearColor]];

CustomTabBar *tabBar = [[CustomTabBar alloc] init];

tabBar.buttonImages = [NSArray arrayWithObjects:@"t1.png", @"t2.png", @"t3.png", @"t4.png", @"t5.png", nil];

tabBar.hightLightButtonImages = [NSArray arrayWithObjects:@"th1.png", @"th2.png", @"th3.png", @"th4.png", @"th5.png", nil];

tabBar.viewControllers = [NSArray arrayWithObjects:HomeNav, LifeNav, InfoNav, BBSNav, MoreNav, nil];

self.tabBarController = tabBar;

[tabBar release];

self.window.rootViewController = self.tabBarController;

    [self.window makeKeyAndVisible];

[SqliteSet OpenDataBase];

    return YES;

}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值