阴影:先设置背景色,不能maskToBounds
bgView.backgroundColor = UIColor.white
bgView.layer.cornerRadius = 5
bgView.layer.shadowOffset = CGSize(width: 0, height: 0)
bgView.layer.shadowOpacity = 1
bgView.layer.shadowColor = UIColor.Font2nd.cgColor
阴影:先设置背景色,不能maskToBounds
bgView.backgroundColor = UIColor.white
bgView.layer.cornerRadius = 5
bgView.layer.shadowOffset = CGSize(width: 0, height: 0)
bgView.layer.shadowOpacity = 1
bgView.layer.shadowColor = UIColor.Font2nd.cgColor
本文标题:swift:view的阴影的实现
本文链接:https://www.haomeiwen.com/subject/hbavjctx.html
网友评论