xib注册

注册

[self.tbv registerNib:[UINib nibWithNibName:@"BGTableViewCell" bundle:nil] forCellReuseIdentifier:@"cell"];

调用方法

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    BGTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    tableView.rowHeight=250;
    model *m = [model new];
    cell.imgV.image = [UIImage imageNamed:m.arrimg[indexPath.row]];
    return cell;
}

猜你喜欢

转载自blog.csdn.net/qq_43361450/article/details/84348214