Swift touch点获取

touchesBegan中的touch点获取

override func touchesBegan(_ touches: Set, with event: UIEvent?) {
        let touch:UITouch = ((touches as NSSet).anyObject()! )as!UITouch
        let point = touch.location(in: self)
     
    }
    

你可能感兴趣的:(Swift touch点获取)