func setBorder(_ color: UIColor, _ width: CGFloat, _ cornerRadius: CGFloat) {
self.layer.cornerRadius = cornerRadius
var frame = self.frame
frame.size.width += 10
frame.size.height = 20
self.frame = frame
self.layer.borderColor = color.cgColor
self.layer.borderWidth = width
self.layer.masksToBounds = true
}








网友评论