2016-10-18 56 views
0

我是首发! 我在TableViewController 7细胞(7天)如何为所有选定的细胞得到indexPath和NSMutableArray的 写我的项目是闹钟如何获取indexPath并写入NSMutableArray

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; 
    cell.accessoryType = UITableViewCellAccessoryCheckmark; 

- (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath{ 
    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; 
    cell.accessoryType = UITableViewCellAccessoryNone; 

} 

请帮助或告诉我一些

+0

看看indexPathsForSelectedRows方法! –

+0

谢谢 - Teja Nandamuri –

回答

0

你可以得到使用这个的indexpath数组。

NSArray * indexPathArray = [yourTableView indexPathsForSelectedRows];