美文网首页
TableView——一个xib中添加多个Cell

TableView——一个xib中添加多个Cell

作者: 虫yu | 来源:发表于2017-01-20 17:09 被阅读123次
上图:
Paste_Image.png Paste_Image.png Paste_Image.png
CouponCell* cell = [tableView dequeueReusableCellWithIdentifier:@"CouponCellNew"];
if(!cell){
    cell = [[[NSBundle mainBundle] loadNibNamed:@"CouponCell" owner:self options:nil] lastObject];
}

此方法只适用于tableview, collectionview目前暂测不适用。

相关文章

网友评论

      本文标题:TableView——一个xib中添加多个Cell

      本文链接:https://www.haomeiwen.com/subject/pxxgbttx.html