Closed imzyf closed 6 years ago
http://qingqinghebiancao.github.io/2016/01/12/iOS%E5%BC%80%E5%8F%91%E5%B0%8F%E6%8A%80%E5%B7%A7/
https://stackoverflow.com/questions/13505379/adding-rounded-corner-and-drop-shadow-to-uicollectionviewcell
self.contentView.layer.cornerRadius = 2.0 self.contentView.layer.borderWidth = 1.0 self.contentView.layer.borderColor = UIColor.clear.cgColor self.contentView.layer.masksToBounds = true self.layer.shadowColor = UIColor.lightGray.cgColor self.layer.shadowOffset = CGSize(width: 0, height: 2.0) self.layer.shadowRadius = 2.0 self.layer.shadowOpacity = 1.0 self.layer.masksToBounds = false self.layer.shadowPath = UIBezierPath(roundedRect: self.bounds, cornerRadius: self.contentView.layer.cornerRadius).cgPath
合并
http://qingqinghebiancao.github.io/2016/01/12/iOS%E5%BC%80%E5%8F%91%E5%B0%8F%E6%8A%80%E5%B7%A7/
https://stackoverflow.com/questions/13505379/adding-rounded-corner-and-drop-shadow-to-uicollectionviewcell