iOS UIView touchesBegan 判断点击区域是否
2020-09-18 本文已影响0人
gaookey
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
guard let point = touches.first?.location(in: view) else { return }
let p = someView.layer.convert(point, from: view.layer)
if someView.layer.contains(p) {
}
}