Closed KinmoCode closed 5 years ago
icon 加,还是tabbaritem backgroundimage 加?视觉图有吗?
@ChenYilong 已解决,加在tabbar上面,不过要在AppDelegate的里面加,要不然拿不到tabbar.
项目任何地方都可以拿到tabbar,readme里有写。
Demo中也有演示:
//Three way to deal with shadow 三种阴影处理方式:
// NO.3, without shadow
[[UITabBar appearance] setShadowImage:[UIImage new]];
//NO.2,using Image
// [[UITabBar appearance] setShadowImage:[UIImage imageNamed:@"TabBar_Bg_Shadow"]];
//NO.1,using layer to add shadow. note:recommended. 推荐该方式,可以给PlusButton突出的部分也添加上阴影
tabBarController.tabBar.clipsToBounds = NO;
tabBarController.tabBar.layer.shadowColor = [UIColor blackColor].CGColor;
tabBarController.tabBar.layer.shadowRadius = 5.0;
tabBarController.tabBar.layer.shadowOpacity = 0.2;
tabBarController.tabBar.layer.masksToBounds = NO;
tabBarController.tabBar.layer.shadowOffset = CGSizeMake(0, 3);
Base Info for this issue
1. How to repeat the problem.
2. Please help me in this way.
3. Here is a Demo.
4. Here is my Debug log