I have a tableview for which I am using
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView cellForRowAtIndexPath:indexPath].accessoryType = UITableViewCellAccessoryCheckmark;
}
I have an NSArray *selectedDiscounts which I have assigned like this
selectedDiscounts = [self.tableView indexPathsForSelectedRows];
I have to pass the selected table rows data to another controller where I will be populating the tableView with selected rows.
The problem is selectedDiscounts either holds only selected indexPaths and not the data? because of which it shows me the number of objects that are selected but not the data for those selected cells.
I want to store the selected rows data into an NSArray variable. Is that possible? Thanks guys.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…