我想隐藏它没有数据的其他细胞,因为我填补了小区用户拍照。显示只有一格
例如
这是表视图细胞,作为用户需要的细胞应该建立基本上示出了所覆盖的小区的照片。
------------------- 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;
}
为什么不直接插入一个新的细胞一旦用户拍摄的图像? – sbarow
如何一次插入一个单元? – TryingToLearn