当我点击任何单元格文本时,它变成蓝色,当我再次回来时,它仍然是蓝色,直到我点击另一个单元格如何解决此问题 我使用UITableView与详细文本标签。UITableView单元格颜色不消失
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
UIImageView* img = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"cell1.png"]];
[cell setBackgroundView:img];
[img release];
}
- (空)的tableView:(UITableView的*)的tableView didSelectRowAtIndexPath方法:(NSIndexPath *)indexPath { \t \t CategoriesList * dvController = [[CategoriesList alloc] initWithNibName:@“CategoriesList”bundle:nil]; \t //将选定的对象传递给新的视图控制器。 \t //dvController.description = description; \t //dvController.title=title; \t //dvController.descriptionImage=descriptionImage; \t [self.navigationController pushViewController:dvController animated:YES]; \t [dvController release]; \t } – ali
我在编辑你的代码,但它不工作 – ali
@ali“不工作”是一个不好的描述。什么不工作? – Vladimir