誰かが私の問題を解決できますか?
- (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)を別のView Controllerに渡し、そのtableview(view controller)に選択した行のみを表示するにはどうすればよいですか?