拖拉控件TableView关系如下:

拖拉控件TableView的使用

并且要在cellForRow方法里面添加如下代码:

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    FirstTableViewCell *cell = (FirstTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"FirstCellReuse"];
    if (cell == nil) {
        NSArray * nib = [[NSBundle mainBundle]loadNibNamed:@"FirstTableViewCell" owner:self options:nil];
        cell = [nib objectAtIndex:0];
    }
    cell.nameLabel.text = self.array[indexPath.row];
    return cell;
}
再实现它的delegate和datasource就可以了

相关文章:

  • 2021-08-26
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
  • 2021-07-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2021-12-27
相关资源
相似解决方案