'How to differ from different images in iPhone programing

I have a view with some images. I want to know which image I selected. If I select an image, it will come to same method if I select another image.

On every image I select the "touchesEnded:" method is executed. Is there away to differ between the images? Any help will be appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source