更新在UITableView中先前选择的行我试图像这样...在cellForRowAtIndex()如何显示与选中标记选择的行,而在目标C
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *[email protected]"SimpleTableViewIdentifier";
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:SimpleTableViewIdentifier];
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:SimpleTableViewIdentifier];
}
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.textLabel.text=[hardDependencyAlldataArray objectAtIndex:indexPath.row];
return cell;
}
和以下didSelectRowAtIndexPath方法的代码行中加入..
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryType = UITableViewCellAccessoryCheckmark;
[tableView deselectRowAtIndexPath:indexPath animated:YES];
但是,在更新以前选择的值,查马克没有显示onpreviously选择rows..any一个可以在这个issue..Thanks帮助提前.. :)
你是什么意思“更新以前的选定值”? – Arun
thq..for ur response .. :) .. –
以前我从表格视图中选择行...选择出现选中行上的复选标记...现在我想在出发之前在先前选择的行上显示agian复选标记更新... –