[Solved] Confused about ios touches code [duplicate]

UITouch *touch = [touches anyObject]; touches is a NSSet of UITouch. The code simply gets one object from touches and assigns it to a variable named touch. This is implicitly assuming that the NSSet hold only one element. CGPoint location = [touch locationInView:[touch view]]; the above line gets the (x,y) coordinates of the touch in … Read more