【发布时间】:2014-07-16 01:12:11
【问题描述】:
我有一个相当复杂的视图布局:
ViewController
- TableViewController inside ContainerView (as child view controller)
- TableViewCell which holds UICollectionView with subclassed (custom) FlowLayout
当尝试通过我的子类 FlowLayout 添加 UICollectionElementKindSectionHeader 补充视图时,我收到以下错误:
*** Assertion failure in -[MyCollectionView _createPreparedSupplementaryViewForElementOfKind:atIndexPath:withLayoutAttributes:applyAttributes:], /SourceCache/UIKit_Sim/UIKit-2935.137/UICollectionView.m:1305
这里提出的尝试过的解决方案:UICollectionView + iOS 7 / Xcode 5 = Assertion Failure 但没有任何运气。我正在为我的 TableViewCells 使用动态自动布局高度,我想知道是否可以这样做...
任何人有想法或可以指出正确的方向来解决问题吗?谢谢!
【问题讨论】:
-
我找到了这个 [solutions][1] [1]: stackoverflow.com/questions/33253109/… ,现在可以正常使用了
标签: ios uicollectionview autolayout uicollectionviewlayout