UITableView _dequeueReusableViewOfType:withIdentifier:

在xib tableviewcell里放了N多个UIView

在这里插入图片描述
在使用这个cell的时候不能使用CouponCell *cell = [tableView dequeueReusableCellWithIdentifier:@“cellID” forIndexPath:indexPath];

而是要使用

CouponCell *cell = [[[NSBundle mainBundle] loadNibNamed:@"CouponCell" owner:self options:nil] objectAtIndex:0];

版权声明:本文为ltf857原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。