标签:
方法一:
1
2
3
4
|
第一步: [self.collectionView registerNib:[UINib nibWithNibName:@ "QGLShareBtnCell" bundle:nil] forCellWithReuseIdentifier:@"QGLShareBtnCell”]; 第二步: QGLShareBtnCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@ "QGLShareBtnCell" forIndexPath:indexPath]; |
方法二:
1
2
3
4
|
QGLIMGroupListCell *cell = (QGLIMGroupListCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell= (QGLIMGroupListCell *)[[[NSBundle mainBundle] loadNibNamed:@ "QGLIMGroupListCell" owner:self options:nil] lastObject]; } |
- -!更为坑的是,居然忘记给xib设置identifier了。。。
标签:
原文地址:http://www.cnblogs.com/iamjjh/p/4669367.html