美文网首页
UITabBarController标签

UITabBarController标签

作者: 邱ku | 来源:发表于2017-11-29 13:29 被阅读0次

yiViewController *yi=[yiViewController new];
    UINavigationController *navyi=[[UINavigationController alloc] initWithRootViewController:yi];
    UITabBarItem *Itemyi=[[UITabBarItem alloc] initWithTitle:@"yi" image:nil tag:1001];
    navyi.tabBarItem=Itemyi;
    navyi.tabBarItem.badgeValue=@"123";
   
    erViewController *er=[erViewController new];
    UINavigationController *naver=[[UINavigationController alloc] initWithRootViewController:er];
    UITabBarItem *Itemer=[[UITabBarItem alloc] initWithTitle:@"er" image:nil tag:1002];
    naver.tabBarItem=Itemer;
   
    sanViewController *san=[sanViewController new];
    UINavigationController *navsan=[[UINavigationController alloc] initWithRootViewController:san];
    UITabBarItem *Itemsan=[[UITabBarItem alloc] initWithTitle:@"san" image:nil tag:1003];
    navsan.tabBarItem=Itemsan;
   
    //设置标签栏文字和图片的颜色
  navsan.navigationBar.tintColor = [UIColor orangeColor];
   
//    //设置标签栏的颜色
    navsan.navigationBar.barTintColor = [UIColor yellowColor];

    self.viewControllers=@[navyi,naver,navsan];

相关文章

网友评论

      本文标题:UITabBarController标签

      本文链接:https://www.haomeiwen.com/subject/sietextx.html