iOS给view添加阴影效果
2021-02-26 本文已影响0人
一念飘过
let aview =UIView()
aview.backgroundColor = UIColor.white
self.layer.cornerRadius = 4
self.layer.masksToBounds = false
self.layer.shadowColor = UIColor(rgba: "#666666").cgColor
self.layer.shadowOffset = .zero
self.layer.shadowOpacity = 0.4;
return aview