//我在这段代码上出现内存泄漏。有任何想法吗? (我认为它连接到tapRecognizer)
func paletteTapped( _ tapRecognizer : UITapGestureRecognizer )
{
if tapRecognizer.state == .ended {
let touch = tapRecognizer.location( in: self )
if let color = colorForTouch(touch) {
self.delegate?.selectPaletteColor(color)
}
fadeOut()
}
}