美文网首页
UITabbar自定义

UITabbar自定义

作者: 傻人有傻福i | 来源:发表于2018-11-22 16:02 被阅读0次

     oneViewController * first =[oneViewController new];

        UINavigationController * oneNav =[[UINavigationController  alloc]initWithRootViewController:first];

        oneNav.tabBarItem=[[UITabBarItem alloc]initWithTitle:@"XX" image:[UIImage imageNamed:@""] selectedImage:[UIImage imageNamed:@""]];

        twoViewController * second =[twoViewController new];

        UINavigationController * twoNav =[[UINavigationController  alloc]initWithRootViewController:second];

        twoNav.tabBarItem=[[UITabBarItem alloc]initWithTitle:@"XX" image:[UIImage imageNamed:@""] selectedImage:[UIImage imageNamed:@""]];

        threeViewController * third =[threeViewController new];

        UINavigationController * threeNav =[[UINavigationController  alloc]initWithRootViewController:third];

        threeNav.tabBarItem=[[UITabBarItem alloc]initWithTitle:@"XX" image:[UIImage imageNamed:@""] selectedImage:[UIImage imageNamed:@""]];

        fourViewController * fouth = [fourViewController new];

        UINavigationController * fourNav = [[UINavigationController alloc]initWithRootViewController:fouth];

        fourNav.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"XX" image:[UIImage imageNamed:@""] selectedImage:[UIImage imageNamed:@""]];

        fiveViewController * fifth =[fiveViewController new];

        UINavigationController * fiveNav =[[UINavigationController  alloc]initWithRootViewController:fifth];

        fiveNav.tabBarItem=[[UITabBarItem alloc]initWithTitle:@"XX" image:[UIImage imageNamed:@""] selectedImage:[UIImage imageNamed:@""]];

        self.viewControllers=@[oneNav,twoNav,threeNav,fourNav,fiveNav];

    相关文章

      网友评论

          本文标题:UITabbar自定义

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