- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSArray *listData =[self.tableContents objectForKey:
[self.sortedKeys objectAtIndex:[indexPath section]]];
NSUInteger row = [indexPath row];
NSString *rowValue = [listData objectAtIndex:row];
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.backgroundView = [[[UIImageView alloc] init] autorelease];
cell.selectedBackgroundView = [[[UIImageView alloc]init] autorelease];
((UIImageView *) cell.backgroundView).image = [UIImage imageNamed:@"checkbox-checked.png"];
((UIImageView *) cell.selectedBackgroundView).image = [UIImage imageNamed:@"checkbox-checked.png"];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
No comments:
Post a Comment