UITableViewDelegate has a method to identify which row i select in the tableView.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
But how can i know which row i have selected how many times?
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.
In your
datamodelyou can have a int variable to know how many times the data has been selected. Increment that in the method you have mentioned in your question. I hope you get the idea now. You cannot use the cell to maintain the count as they are reused.Get the data and indexpath.row and increment the count.