SwiftStudier SwiftStudier - 9 months ago 26
Swift Question

Check if different views touched at the same time

I've few UIView on my ViewController
How can I check if all of them touched now? They are placed in different sides of screen and each of them must be touched by separated fingers


using the touchesEnded delegate

override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
        startTouchPosition = touches.first?.locationInView(self)
        let touch = touches.first
        if let touchPoint = touch?.locationInView(self){
            for view in self.views{