iOS开发之UITabBar
来源:互联网 发布:单片机串口中断接收 编辑:程序博客网 时间:2024/06/06 01:46
//设置tabbar的背景图片
UITabBar *tabBar = self.tabBarController.tabBar;
//tabBar的字体颜色
[tabBarsetTintColor:[UIColor colorWithRed:0.0 green:176.0/255.0
blue:226.0/255.0 alpha:1.0];
//tabBar选中图片时字体颜色
tabBar.selectedImageTintColor = [UIColorclearColor];
UITabBarItem *item = [tabBar.items objectAtIndex:0];
#########################################################################################
FirstViewController *firstVC = [[[FirstViewControlleralloc] init] autorelease];
firstVC.tabBarItem = [[[UITabBarItemalloc] initWithTitle:@""image:[UIImageimageNamed:@"iconfont-xiaosuolvetu-3.png"]selectedImage:[UIImageimageNamed:@"iconfont-xiaosuolvetu-4.png"]]autorelease];
UINavigationController *firNaviVC = [[[UINavigationControlleralloc] initWithRootViewController:firstVC]autorelease];
firstVC.title =@"";
firstVC.navigationController.navigationBar.barTintColor = [UIColorcolorWithRed:0/255.0fgreen:191/255.0fblue:255/255.0falpha:1];
SecondViewController *secondVC = [[[SecondViewControlleralloc] init] autorelease];
secondVC.tabBarItem = [[[UITabBarItemalloc] initWithTitle:@""image:[UIImageimageNamed:@"iconfont-star.png"]selectedImage:[UIImageimageNamed:@"iconfont-star-2.png"]]autorelease];
UINavigationController *secNaviVC = [[[UINavigationControlleralloc] initWithRootViewController:secondVC]autorelease];
secondVC.title =@"";
secondVC.navigationController.navigationBar.barTintColor = [UIColorcolorWithRed:0/255.0fgreen:191/255.0fblue:255/255.0falpha:1];
ThirdViewController *thirdVC = [[[ThirdViewControlleralloc] init] autorelease];
thirdVC.tabBarItem = [[[UITabBarItemalloc] initWithTitle:@""image:[UIImageimageNamed:@"iconfont-bbgzhinan.png"]selectedImage:[UIImageimageNamed:@"iconfont-bbgzhinan-2.png"]]autorelease];
UINavigationController *thiNaviVC = [[[UINavigationControlleralloc] initWithRootViewController:thirdVC]autorelease];
thirdVC.title =@"";
thirdVC.navigationController.navigationBar.barTintColor = [UIColorcolorWithRed:0/255.0fgreen:191/255.0fblue:255/255.0falpha:1];
NSArray *array = [NSArrayarrayWithObjects:firNaviVC, secNaviVC, thiNaviVC,nil];
self.viewControllers = array;
self.tabBar.tintColor = [UIColorcolorWithRed:0/255.0fgreen:191/255.0fblue:255/255.0falpha:1]
- iOS开发之UITabBar
- iOS开发 ☞ UITabbar
- iOS之UITabBar
- iOS 开发之改变UITabbar顶部分割线颜色
- ios开发点滴-uitabbar
- iOS开发自定义UITabBar实现
- iOS之UITabBar的使用
- iOS开发:设置 UITabBar 的背景色
- iOS之UITabBar 的相关属性
- iOS之UITabBar的简单使用
- IOS开发小功能:自定义UITabBar,可以直接拿来用
- iOS开发 UITabBar角标 红点形式 (tabBarItem.badgeValue)
- ios项目常用模板框架之UITabBar+Nav
- iphone开发之设置UITabBar的相关属性
- iphone开发之设置UITabBar的相关属性
- iOS UITabBar总结
- (转)IOS自定义UITabBar
- (转)IOS自定义UITabBar
- leetcode 157: Read N Characters Given Read4
- Access restriction: The type * is not accessible due to restrict,报错问题,只试过第一种,OK。
- 删除Excel 空白行
- Android批量打包提速 - 1分钟900个市场不是梦
- JVM系列一:JVM内存组成及分配
- iOS开发之UITabBar
- ASP.net MVC routeMap
- js中的arguments,caller,callee,apply
- 斯坦福大学公开课 :机器学习课程(Andrew Ng)——12、无监督学习:Factor Analysis
- IOS学习 Core-Animation旋转和平移
- PHP IMAP收QQ邮件,SMTP存入另外QQ邮箱
- AJAX——Introduction和最简单的AJAX例子
- maven打包时跳过测试
- 实现dedecms织梦目录式伪静态的方法