我使用的滑動刪除功能的再次表現出的uImage - 滑動刪除奧斯 -
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
//add code here for when you hit delete
NSLog(@"UITableViewCellEditingStyleDelete");
[liste removeObjectAtIndex:indexPath.row];
[self refreshTableView];
}
}
,我需要隱藏選定的蜂窩小區的的uImage,所以我用這個代碼
- (void)tableView:(UITableView*)tableView willBeginEditingRowAtIndexPath:(NSIndexPath *)indexPath;{
cellTodelete = (ListeRestoCell *) [self.tableView cellForRowAtIndexPath:indexPath];
if(cellTodelete.eventImage.hidden==NO) {
a = 1 ;
cellTodelete.eventImage.hidden = YES ;
}
return;
}
這項工作很好,唯一的問題是,即使按鈕刪除不點擊我的uImage是隱藏的,所以我需要,如果按鈕來刪除未獲得點擊再次顯示圖像。我怎樣才能做到這一點?
檢查現在我的答案是更新中... – Venkat