iOS UITabBar : Remove top shadow gradient line

前端 未结 15 1287
暖寄归人
暖寄归人 2020-12-02 08:59

I implemented a custom UITabBar and I still have this gradient/shadow on top of it. I added

[self.tabBar setBackgroundImage:[UIImage imageNamed:@\"navBarBotto

15条回答
  •  粉色の甜心
    2020-12-02 09:39

    Just be setting image it will not remove the shadow line you have to set it's borderWidth to 0. here is the code

    [[UITabBar appearance] setShadowImage:[UIImage new]];

    [UITabBar appearance].layer.borderWidth = 0.0f;

    [UITabBar appearance].clipsToBounds = true;

提交回复
热议问题