Remove top line from TabBar

2019-01-25 18:06发布

On iOS 10 this code doesn't work in order to remove the tabBar shadow line:

[[UITabBar appearance] setShadowImage:[[UIImage alloc] init]];

Somebody knows, what must I do to remove it?

On iOS 9.3 with this two lines the line is removed, but iOS 10 ignores setShadowImage command.

标签: ios ios10 tabbar
7条回答
走好不送
2楼-- · 2019-01-25 18:58

You should implement the following two methods at the same time:

[[UITabBar appearance] setShadowImage:[UIImage new]];
[[UITabBar appearance] setBackgroundImage:[UIImage new]];
查看更多
登录 后发表回答