上图:



CouponCell* cell = [tableView dequeueReusableCellWithIdentifier:@"CouponCellNew"];
if(!cell){
cell = [[[NSBundle mainBundle] loadNibNamed:@"CouponCell" owner:self options:nil] lastObject];
}
此方法只适用于tableview, collectionview目前暂测不适用。
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
网友评论