美文网首页
iOS UIView touchesBegan 判断点击区域是否

iOS UIView touchesBegan 判断点击区域是否

作者: gaookey | 来源:发表于2020-09-18 20:24 被阅读0次
        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) {
    
            }
        }
    

    相关文章

      网友评论

          本文标题:iOS UIView touchesBegan 判断点击区域是否

          本文链接:https://www.haomeiwen.com/subject/qufsyktx.html