With initially k=0; I have omitted code which lays out four views each with snapshot action. ( for simplicity) Now the problem is when I press snapshot action button of any view I should know somehow that snapshot action button of THAT particular window is pressed. How can I ? How would I pass value of to my snap function? Do I need to store values of 'k' in some array? (some bad idea)