1.參數(shù)的傳遞
let tap = UITapGestureRecognizer(target: self, action: #selector(self.tapClick(_:)))
currentImageView.addGestureRecognizer(tap)
2.方法的實(shí)現(xiàn)
func tapClick(_ tap: UITapGestureRecognizer) {
}
注:只有對(duì)應(yīng)的方法實(shí)現(xiàn)了才不會(huì)報(bào)錯(cuò)