ios 原生Tabbar去掉顶部横线,顶部圆角效果
2020-09-01 本文已影响0人
wenju
Swift版
tabBar.backgroundImage = UIImage.init()
tabBar.shadowImage = UIImage.init()
tabBar.layer.cornerRadius = 16
tabBar.layer.maskedCorners = [.layerMinXMinYCorner, .layerMaxXMinYCorner]
Oc版
//添加顶部圆角
self.view.layer.cornerRadius = 16;
self.view.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;