The touch object for each finger will remain unchanged with the same memory address as on the screen. You can track individual fingers in a multi-touch scenario by storing the address of the sensor objects in an array and then comparing it with this array to know exactly which finger is moving.
var fingers = [String?](count:5, repeatedValue: nil) override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { super.touchesBegan(touches, withEvent: event) for touch in touches{ let point = touch.locationInView(self.view) for (index,finger) in fingers.enumerate() { if finger == nil { fingers[index] = String(format: "%p", touch) print("finger \(index+1): x=\(point.x) , y=\(point.y)") break } } } } override func touchesMoved(touches: Set<UITouch>, withEvent event: UIEvent?) { super.touchesMoved(touches, withEvent: event) for touch in touches { let point = touch.locationInView(self.view) for (index,finger) in fingers.enumerate() { if let finger = finger where finger == String(format: "%p", touch) { print("finger \(index+1): x=\(point.x) , y=\(point.y)") break } } } } override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) { super.touchesEnded(touches, withEvent: event) for touch in touches { for (index,finger) in fingers.enumerate() { if let finger = finger where finger == String(format: "%p", touch) { fingers[index] = nil break } } } } override func touchesCancelled(touches: Set<UITouch>?, withEvent event: UIEvent?) { super.touchesCancelled(touches, withEvent: event) guard let touches = touches else { return } touchesEnded(touches, withEvent: event) }
Updated for quick 4
Credit @Klowne
var fingers = [UITouch?](repeating: nil, count:5) override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { super.touchesBegan(touches, with: event) for touch in touches{ let point = touch.location(in: self.view) for (index,finger) in fingers.enumerated() { if finger == nil { fingers[index] = touch print("finger \(index+1): x=\(point.x) , y=\(point.y)") break } } } } override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) { super.touchesMoved(touches, with: event) for touch in touches { let point = touch.location(in: self.view) for (index,finger) in fingers.enumerated() { if let finger = finger, finger == touch { print("finger \(index+1): x=\(point.x) , y=\(point.y)") break } } } } override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { super.touchesEnded(touches, with: event) for touch in touches { for (index,finger) in fingers.enumerated() { if let finger = finger, finger == touch { fingers[index] = nil break } } } } override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) { super.touchesCancelled(touches, with: event) guard let touches = touches else { return } touchesEnded(touches, with: event) }
* According to updated updated documentation, Apple is now OK to save strokes during multiple touch sequences until they are released at the end of the sequence