0
我做像uitable視圖定製細胞的細胞的圖像下面不能更新表視圖
- (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];
}
特定細胞的圖像從表視圖改變
但是,圖像並沒有改變
我在中間缺少什麼......請幫助,如果你有關於這個問題的任何線索。