美文网首页
怎么给导航栏底部导航加阴影同时去掉底部横线

怎么给导航栏底部导航加阴影同时去掉底部横线

作者: super_2e20 | 来源:发表于2019-03-25 17:59 被阅读0次
//先去掉底部的横线

 [tabBarVC.tabBar setBackgroundImage:[MSDTools imageWithColor:[UIColor whiteColor]]];

 [tabBarVC.tabBar setShadowImage:[MSDTools imageWithColor:[UIColor whiteColor]]];

 //添加阴影

  tabBarVC.tabBar.layer.shadowColor= UIColorFromHex(0xdddddd).CGColor; 设置阴影颜色

  tabBarVC.tabBar.layer.shadowOffset = CGSizeMake(0, -2); 阴影偏移x,y向(上/下)偏移(-/+)2

  tabBarVC.tabBar.layer.shadowOpacity = 0.6; 阴影透明度

  tabBarVC.tabBar.layer.shadowRadius = 4.0f;//阴影半径

相关文章

网友评论

      本文标题:怎么给导航栏底部导航加阴影同时去掉底部横线

      本文链接:https://www.haomeiwen.com/subject/pxbbvqtx.html