码迷,mamicode.com
首页 > 移动开发 > 详细

*** Assertion failure in -[UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:]1555错误

时间:2015-12-07 18:38:29      阅读:1005      评论:0      收藏:0      [点我收藏+]

标签:

出现此错误的原因就是下面的方法里面

- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath

不可 alloc 你想要的view 需要通过collectionView的

dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:kProductSectionFooterIdentifier forIndexPath:indexPath

方法复用

 

*** Assertion failure in -[UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:]1555错误

标签:

原文地址:http://www.cnblogs.com/ycq-firstBlood/p/5026617.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!