//重写高亮
override func setHighlighted(highlighted: Bool, animated: Bool) {
// super.setHighlighted(highlighted, animated: animated)
if highlighted {
self.backgroundColor = UIColor(white: 0, alpha: 0.45)
}else {
self.backgroundColor = UIColor(white: 0, alpha: 0.25)
}
}
//重写选中
override func setSelected(selected: Bool, animated: Bool) {
// super.setSelected(selected, animated: animated)
if selected {
self.backgroundColor = UIColor(white: 0, alpha: 0.45)
}else {
self.backgroundColor = UIColor(white: 0, alpha: 0.25)
}
}
网友评论