I have a mac app that uses tableView that has some rows.On taping(single tap ) a particular row, I want that row number.Actually , I want to set the value of the label based on the row number selected.Please help!
Share
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.
Your table delegate can implement
- (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(NSInteger)row;Seems like that’ll give you the row you want, then just return “YES” to allow the selection.
Or your delegate could implement
- (void)tableViewSelectionDidChange:(NSNotification *)notification;and then get the currently selected cell (though if you allow multiple selection this might not be sufficient).