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

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

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

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

dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:kProductSectionFooterIdentifier forIndexPath:indexPath

方法复用

时间: 2024-08-05 19:37:46

*** Assertion failure in -[UICollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:]1555错误的相关文章

*** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory

报错提示: *** Assertion failure in -[UICollectionView _dequeueReusableViewOfKind:withIdentifier:forIndexPath:viewCategory:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UICollectionView.m:3307 *** Terminating app due to uncaught exception 'NSInternalInconsis

Delphi2007 在Win10 下运行报错 Assertion failure

Delphi2007 原来安装在Win7 下 运行正常, 自从升级到Win10 ,新建工程运行然后关闭报错, 报错信息如下: ---------------------------bds.exe - bordbk105N.dll---------------------------Assertion failure: "(!"SetThreadContext failed")"in ..\win32src\thread32.cpp at line 412Contin

Assertion failure in -[UIView layoutSublayersOfLayer:]

Assertion failure in -[UIView layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2935.137/UIView.m:8803(ios7系统) 解决方法:重写对应UIView(假如上面的UIView是UIProgressView)的 layoutSublayersOfLayer 并且调用[self layoutSubViews]; 当当前UIView的子控件布局完自动约束后调用 layoutIfNeeded 例如这里

IOS之Bug--关于Assertion failure in -[UIApplication _runWithMainScene

出现的问题: 解决方式是将出现的bug信息Assertion failure in -[UIApplication _runWithMainScene....这前面部分拷贝到Google搜索引擎一搜索就有:

iOS Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:]

Assertion failure in -[UITableView _classicHeightForRowAtIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318/UITableView.m:10772 这问题是由于cell高度负数导致,去看看: - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

解决:CWnd::SetWindowText报Assertion failure

参考资料: http://www.cnblogs.com/tiancun/p/3756581.html http://www.tc5u.com/mfc/2120698.htm http://forums.codeguru.com/showthread.php?379745-setwindowtext-in-cdialog-ctor-causes-assertion-to-fail 出错代码: 1 CInfoDlg dlg; 2 dlg.GetDlgItem(IDC_STATIC)->SetWin

Assertion failure in UITableViewCell layoutSublayersOfLayer解决办法

iOS6 设备在更新UITableViewCell的时候遇到了 Assertion failure in -[UITableViewCell layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2380.17/UIView.m:5776 的问题, 解决方法是,把UITableViewCell里面的控件的添加方式由 [self addSubview:self.titleLabel]; 改成 [self.contentView addSubview:

Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]

今天做一个tableView动态单元格遇到一个这么个问题.  Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/... 因为 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 这个函数的返回值是个

iOS Assertion failure in [MyClass layoutSublayersOfLayer:]

// 某自定义的view的layoutSubviews方法 - (void)layoutSubviews { [super layoutSubviews]; // 执行完[super layoutSubviews]后,写约束代码,在iOS7下会崩溃,报  Assertion failure in [MyClass layoutSublayersOfLayer:],iOS8下则是正常的. } 修改方法,把[super layoutSubviews];放在后面,像下面这样 - (void)layou