Get various coordinates for touches in swift

2206 views swift
0

Im trying to get the coordinates of various points when touching in a UIView for swift 4. I've seen the other post regarding a similar problem, but that code only allows the first touch to be registered. I would appreciate some help. Thanks.

answered question

1 Answer

13

You can implement the touchesMoved callback on your UIView subclass to do this.

func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?)

This function gets called repeatedly while the touch is ongoing.

posted this

Have an answer?

JD

Please login first before posting an answer.