GithubHelp home page GithubHelp logo

maskmale / ccnavtab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qianlishun/ccnavtab

0.0 1.0 0.0 538 KB

A easy way to construct a frame(一个数组搞定 UINavigationController+UITabBarController 框架)

Home Page: www.xiongcaichang.com

License: Apache License 2.0

Ruby 1.69% Objective-C 98.31%

ccnavtab's Introduction

CCNavTab 快速搭建 IOS UI 主流框架

Build Status Pod Version Pod Platform Pod License Dependency Status Support 

##安装

  • cocopods
 pod 'CCNavTab'
  • 传统使用方法 新建工程,讲 CCNavTab 的demo 的 Lib 文件夹拖入您的项目

##使用

1.新建主控制器 MainController 继承自 CCTabController 在 MainController 的 viewDidLoad 方法中

  • 可选配置
    /**
     配置导航栏的颜色/图片
     注意:当背景颜色设置时图片不生效 一般二选其一  默认为系统白色
    */
    self.navigationBarBackgroundColor=[UIColor colorWithRed:arc4random_uniform(255)/255.0 green:arc4random_uniform(255)/255.0 blue:arc4random_uniform(255)/255.0 alpha:1];
    
    //self.navigationBarBackgroundImage = [UIImage imageNamed:@"background"] ;
    
    
    /**
     可选配置
     导航栏文字颜色  Title  和 BarButtonItem  默认为黑色
     */
    self.navigationBarTintColor = [UIColor whiteColor];
    

2.第二步:添加子控制器配置数组

  • 配置数组 VIEWCONTROLLER 除下面代码创建方式外外可从storyboard 加载
    self.childControllerAndIconArr=@[
                                     /************第一个控制器配置信息*********************/
                                     @{
                                         VIEWCONTROLLER : [[OneController alloc]init],  //控制器对象
                                         NORMAL_ICON : @"icon_classTable",             //正常状态的Icon 名称
                                         SELECTED_ICON : @"icon_classTable_selected",  //选中状态的Icon 名称
                                         TITLE : @""                                 //Nav和Tab的标题
                                         },
                                     /************第二个控制器配置信息*********************/
                                     @{
                                         VIEWCONTROLLER : [[TwoController alloc]init],
                                         NORMAL_ICON : @"icon_me",
                                         SELECTED_ICON : @"icon_me_selected",
                                         TITLE : @"校园"
                                         },
                                     ];

  • bageView 使用 和系统一样,当为 @"0" 时则隐藏
       self.tabBarItem.badgeValue=@"6";

截图

Drawing

ccnavtab's People

Contributors

qianlishun avatar xiongcaichang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.