I want to change the data of two rows in two different sections when one of them is selected so that they will have the same answer. 但它不起作用:
NSIndexPath *indexPath1 = [NSIndexPath indexPathForRow:row1 inSection:section1];
cell = [self.tableView cellForRowAtIndexPath:indexPath1];
//DO SOMETHING WITH CELL LABEL
NSIndexPath *indexPath2 = [NSIndexPath indexPathForRow:row2 inSection:section2];
cell = [self.tableView cellForRowAtIndexPath:indexPath2];
//MAKE THIS CELL LABEL SAME AS THE LAST ONE
如果第二个单元格位于不同的部分,则它不起作用!有什么建议吗?