let tap = UITapGestureRecognizer(target: self, action: #selector(tap(r:)))
clickView.addGestureRecognizer(tap)
@objc func tap(r: UITapGestureRecognizer) {
stickers.forEach { s in
//点击事件
}
}
let tap = UITapGestureRecognizer(target: self, action: #selector(tap(r:)))
clickView.addGestureRecognizer(tap)
@objc func tap(r: UITapGestureRecognizer) {
stickers.forEach { s in
//点击事件
}
}
本文标题:ios swift 任意view 添加tap点击事件
本文链接:https://www.haomeiwen.com/subject/bvmlbltx.html
网友评论