StoryBoard学习1 tabbar实现
来源:互联网 发布:数据库设计excel模板 编辑:程序博客网 时间:2024/05/13 11:43
3、系统的图标太难看了,并且!!点击只能是系统默认的蓝色,找了好久,只能用代码搞定它了,在四个tabbarController中的第一个显示的tabbarController的viewDidLoad实现如下代码: (压缩包中 3.jpg)
static bool isReseted = false;
- (void)resetTabarItemOnlyOnce{
if (isReseted == false) {
UITabBarController *tabBarVC = self.tabBarController;
NSArray *imageArr = @[@"Home",@"Product",@"Cart",@"Self"];
for (int i=0; i<imageArr.count; i++) {
UITabBarItem *tabBarItem = [tabBarVC.tabBar.items objectAtIndex:i];
tabBarItem.selectedImage = [[UIImage imageNamed:STRING_FORMAT(@"%@-on",imageArr[i])] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
tabBarItem.image = [UIImage imageNamed:STRING_FORMAT(@"%@-off",imageArr[i])];
}
isReseted = true;
NSLog(@"<=== 默认tabbar图片 ===>");
}else{
NSLog(@"<=== 默认tabbar图片只会执行一次 ===>");
}
}
NSDictionary *textDic = [NSDictionary dictionaryWithObjectsAndKeys:NavBarColor,NSForegroundColorAttributeName,nil];
[tabBarItem setTitleTextAttributes:textDic forState:UIControlStateSelected];
4、我去,一个下午就这几句话。。。
- StoryBoard学习1 tabbar实现
- 多个storyboard实现tabbar
- iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (1)
- storyboard tabbar
- 点击button实现Storyboard中TabBar Controller的tab切换
- iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (3)
- StoryBoard中创建TabBar
- StoryBoard学习2 兼容性实现
- StoryBoard学习3 tableview实现
- iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (2) 代码部分
- iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (4) 完成
- Storyboard学习五(简单注册页面实现)
- Tutorial: Storyboard in XCode 4.2 with Navigation Controller and Tabbar Controller (Part 1)
- IOS-Storyboard控制器切换之TabBar(3)
- StoryBoard 设置TabBar SelectImage 和tintColor
- iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (3) 深入Segue,Class,Protocol,Delegate的基本使
- 学习storyboard
- 学习storyboard
- 模板输出U方法带锚点 thinkphp
- IOS_UI_UIScrollview
- c++模板和java泛型之间有何不同
- ubuntu忘记开机密码
- java静态类与非静态类
- StoryBoard学习1 tabbar实现
- JavaScript面向对象编程--学习
- const和static辨析
- Oracle 11g服务详细介绍及哪些服务是必须开启的?
- Python---tkinter之Text()
- XPath
- HDU 3966 Aragorn's Story 树链剖分
- [SQL]SQL Server SQL多表连接查询(详细实例)
- 阅读《Android 从入门到精通》(3)——Activity 与界面