iTofu / LCTabBarController

A amazing and highly customized tabBarController! You could almost customize 100% properties with LCTabBarController!
https://LeoDev.me
MIT License
385 stars 81 forks source link

LCTabBarController问题 #4

Closed Zohar163 closed 8 years ago

Zohar163 commented 8 years ago

有点问题想问问: 1、tabBarC.tabBar.backgroundColor = [UIColor yellowColor];好像设置了没有生效; 2、tabBarC.tabBar.selectionIndicatorImage = [UIImage imageNamed:@"tabbaritem_bg"];好像设置了没有生效; 因为有时需求是选中的tabBarItem的背景跟未选中的不一样。有劳了!

iTofu commented 8 years ago

README 中应该有这个问题的解决方案:

HomeVC *vc1 = [[HomeVC alloc] init];
vc1.view.backgroundColor = [UIColor whiteColor];
vc1.tabBarItem.badgeValue = @"23";
vc1.title = @"Home";

// THIS LINE ⬇️
vc1.tabBarItem.image = [UIImage imageNamed:@"tabbar_home"];
vc1.tabBarItem.selectedImage = [UIImage imageNamed:@"tabbar_home_selected"];
iTofu commented 8 years ago

如果你想改变 tabbar 整体的背景色,在 LCTabBarController 中的 77~78 行添加代码:

tabbar.backgroundColor = colorYouNeed;
iTofu commented 8 years ago

我 GitHub Desktop 挂掉了,改不了,你自己改改。

Zohar163 commented 8 years ago

1、LCTabBarController 中的 77~78 行添加代码:tabbar.backgroundColor = [UIColor redColor];有效果;不过这样是直接改你代码,我用背景图片也可以; 2、选中的tabBarItem背景图片能改吗?能改的话怎么改?

iTofu commented 8 years ago

要改代码

发自我的 iPhone

在 2016年3月1日,下午12:34,Zohar163 notifications@github.com 写道:

1、LCTabBarController 中的 77~78 行添加代码:tabbar.backgroundColor = [UIColor redColor];有效果;不过这样是直接改你代码,我用背景图片也可以; 2、选中的tabBarItem背景图片能改吗?能改的话怎么改?

— Reply to this email directly or view it on GitHub.