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

2017-01-20  本文已影响123人  虫yu
上图:
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目前暂测不适用。

上一篇下一篇

猜你喜欢

热点阅读