How can i get section cell text on custom cell button click.
is this possible?
Thank you,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you are drawing the cell set the tag on the button as an index into the array of data that you are displaying
Then when the button is clicked you can get the tag from the action that is called as the button will be passed as a parameter.
If you add the tag to the button for each row. Then in the associated action you have the index into the array that you got the text from to retrieve it again.
This means that the cellForRowAtIndexPath will set the tag for each button as
and when the action is called you will have access to the button that called the action and therefore access to the index into the array