谁能解决我的问题。
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if([self.selectedIndexPaths containsObject:indexPath]){
[self.selectedIndexPaths removeObject:indexPath];
NSLog(@"selectedIndexPaths1 :%@",self.selectedIndexPaths);
} else {
[self.selectedIndexPaths addObject:indexPath];
NSLog(@"selectedIndexPaths2 :%@",self.selectedIndexPaths);
}
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
如何将选定的行(selectedIndexPaths)传递给另一个视图控制器,并且 tableview(视图控制器)只显示选定的行?