I have a uitableview that displays the values of an array. I would like to know if there is a way to update the subtitle of its table cells, based on how many times each cell was tapped.
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.
First of all, you’ll want to use a
NSMutableArrayso you can change its contents after instantiation. Here’s a basic over view of what I just tried to achieve your intended results:In your interface
In your implementation
Then the important part!
When each cell is tapped the number in its
detailTextLabelwill be incremented up by one.