I am writing app in Objective C. I have images dropping down the screen. The other image should catch it. What I want is to identify when the image has been selected.
I was planning to use these lines of code:
imgCatcher.frame.origin.x, imgProg1.frame.origin.x
within this method:
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
Is that the x coordinate at the middle of the item or the left most his side?
Any suggestions regarding this task?
Best regards
The x coordinate is the upper left hand corner of the frame. You can use the x and y coordinates together to grab the exact upper lefthand point. I would also maybe just compare the entire frame as a whole (if the images are different sizes). Or when the user touches the image, set some sort of property inside it indicating that it is currently selected.