So I have a large UIButton
, it is a UIButtonTypeCustom
, and the button target is called for UIControlEventTouchUpInside
. My question
For Swift 3.0:
@IBAction func buyTap(_ sender: Any, forEvent event: UIEvent)
{
let myButton:UIButton = sender as! UIButton
let touches: Set? = event.touches(for: myButton)
let touch: UITouch? = touches?.first
let touchPoint: CGPoint? = touch?.location(in: myButton)
print("touchPoint\(touchPoint)")
}