我想隐藏另一个没有数据的单元格,因为我在用户拍照时填满了单元格。
例如
这是表格视图单元格,当用户拍照时,单元格应该建立起来,基本上显示被覆盖的单元格。
------------------- 1)------------------
hiding the cell
------------------- --------------------> -------------------
-------------------
当用户拍照时,左侧的表格视图应该看起来像右侧。
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info valueForKey:UIImagePickerControllerOriginalImage];
self.thumbnails = image;
[self.imageView setImage:image];
[self dismissViewControllerAnimated:YES completion:NULL];
self.imagePickerController = nil;
[self.view addSubview:tableViewCell];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString * CellIdentifier = @"CustomCell";
CustomTableViewCell *cell = (CustomTableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell == Nil){
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:self options:nil];
cell = [nib objectAtIndex:0];
}
UIImage *thumbnail = self.thumbnails;
cell.photoInfoLabel.text = @"New";
cell.thumbnailImageView.image = thumbnail;
return cell;
}