我正在为合适的视图定制单元格,如下所示
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *CellIdentifier = @"overViewCell";
tableCell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if ( tableCell == nil ) {
[[NSBundle mainBundle] loadNibNamed:@"OverViewCell" owner:self options:nil];
tableCell = overViewCell;
self.overViewCell = nil;
}
..............................................................
}
OverViewCell.xib 看起来像(右图标记为 3 )
后来,我想通过这样做从表格视图中更改特定单元格的图像
- (void) updateImageView {
// currentRow is getting value when cellForRowAtIndex is clicked
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:currentRow inSection:0];
UITableViewCell *cell = [self.tableContent cellForRowAtIndexPath:indexPath];
imageView = (UIImageView*)[cell viewWithTag:3];
imageView.image = [UIImage imageNamed:@"checked.png"];
[self dismissViewControllerAnimated:YES completion:nil];
}
但是,图像根本没有改变
我中间缺少什么...如果您对此问题有任何线索,请提供帮助。