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;
网友评论