2016-10-18 37 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];