1.参数的传递
let tap = UITapGestureRecognizer(target: self, action: #selector(self.tapClick(_:)))
currentImageView.addGestureRecognizer(tap)
2.方法的实现
func tapClick(_ tap: UITapGestureRecognizer) {
}
注:只有对应的方法实现了才不会报错
1.参数的传递
let tap = UITapGestureRecognizer(target: self, action: #selector(self.tapClick(_:)))
currentImageView.addGestureRecognizer(tap)
2.方法的实现
func tapClick(_ tap: UITapGestureRecognizer) {
}
注:只有对应的方法实现了才不会报错