UI课程14 标签视图控制器 UITabBarController
2015-10-04 21:27
603 查看
1.UITabBarController的结构
三层结构:TabBar,Custom Content,Tab bar controlelr view
![](http://img.blog.csdn.net/20151004214458918)
2.相关属性的设置
三层结构:TabBar,Custom Content,Tab bar controlelr view
2.相关属性的设置
//准备视图控制器数组 NSArray *array = @[redNC,orangeNC,yellowNC,greenNC,cyanNC,blueNC,purpleNC]; //创建tabBarController UITabBarController *tabBC = [UITabBarController new]; //设定子视图控制器 tabBC.viewControllers = array; //设置整个 tabBar 的颜色 // tabBC.tabBar.barTintColor = [UIColor lightGrayColor]; //tabBar高度49 //tabBar 样式 // tabBC.tabBar.barStyle = UIBarStyleBlack; //透明 //给tabBar设置背景图片 tabBC.tabBar.backgroundImage = [UIImage imageNamed:@"image"]; //设置标题颜色(着色,字体颜色) tabBC.tabBar.tintColor = [UIColor magentaColor]; //设置选中下标 tabBC.selectedIndex = 2; //设置bageValue redVC.tabBarItem.badgeValue = @"99+"; //设置代理对象 tabBC.delegate = self; //统一修改(一键换肤) [[UINavigationBar appearance] setBarTintColor:[UIColor magentaColor]]; //指定为根视图控制器 [self.window setRootViewController:tabBC];
相关文章推荐
- iOS编程------UILabel
- hdoj 5496 Beauty of Sequence 【求序列所有子序列(去重后)的和】【好题】
- valueOf intValue parsetInt区别
- Handler、Message、MessageQueue、Looper关系及源码分析
- UI课程12 模态viewController,单例及单例模式
- iOS常用UI控件熟悉
- KVO(Key-Value-Observer)键值观察者
- UITableViewCell加载图片
- Servlet的学习之Request请求对象(2)
- ios-UI常见问题之TableView异步加载图片错乱显示
- The JSP specification requires that an attribute name is preceded by whitespace
- SPOJ 1771 NQUEEN (DLX解n皇后问题)
- POST和GET、NSMutableURLRequest和NSURLRequest两组分别的区别
- ZOJ2587 Unique Attack(判定最小割唯一性)
- TextVeiw 的 No package identifier when getting value for resource numb
- Servlet的学习之Request请求对象(1)
- UI课程11 自定义cell及自适应高度
- codeforces 163A A. Substring and Subsequence(dp)
- UIPickerView控件的使用
- 63. Unique Paths II (Graph; DP)