1个回答
展开全部
参考代码:- (void)tableView:(UITableView *)theTableView didSelectRowAtIndexPath:(NSIndexPath *)newIndexPath {[theTableView deselectRowAtIndexPath:[theTableView indexPathForSelectedRow] animated:NO];UITableViewCell *cell = [theTableView cellForRowAtIndexPath:newIndexPath];if (cell.accessoryType == UITableViewCellAccessoryNone) { cell.accessoryType = UITableViewCellAccessoryCheckmark; [selectedCellsMutableArray addObject:newIndexPath];} else if (cell.accessoryType == UITableViewCellAccessoryCheckmark) { cell.accessoryType = UITableViewCellAccessoryNone; [selectedCellsMutableArray removeObjectIdenticalTo:newIndexPath];}} 查看原帖>>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询