Hi am developing jigsaw puzzle for iPhone.
Here i have almost completed the app except finding whether the jigsaw is complete.
Here each piece is a UIImageView, and it has unique tags.
I have tried using x y coordinates, but its no use because user can start fix the puzzle from anywhere in the screen.
So, any idea how to detect whether the images are arranged correctly?
Edit: Thanks a lot all finally i have done it using co ordinates. by tracing location and tags.
Presumably, you have some sort of ‘snap to grid’ mechanism to put each piece precisely into the correct position once it’s close (as would effectively occur with a real jigsaw). Let’s say that this is defined as a specific x,y co-ordinate for the origin of the UIImageView for each piece.
Then, when each piece is in it’s correct position (snapped to it’s position), set a boolean ‘inPlace’ for that piece to YES.
When the value for ‘inPlace’ for all pieces is YES, the jigsaw is complete.