I have a for loop that displays 7 UIButton all with a method pointing to the same view ( for loop , thats why) .
What i want is that when for
e.g ,i click on button1 , the next view will display values that belongs to button1 .
and when i click on button2 , the next view (same view again) will display values that belongs to button2.
Any idea on how to work on that?
I have classes and appDelegate to store this values in it
Edit:
my UIButton is programmatically created, i cannot link IBAction to it. I think a few have mistaken about my question.
For that, When you are looping for button, at that time, give tag value to button. And create one method like below:
inside that, you will get the Tag of button which is clicked. And you can do according to Tag.
Just set the tag while you are creating the buttons programmatically.
Cheers.