2016-09-14 16 views
0

内部に4つのUITableViewCellを持つUITableViewがあります。それは20 UICollectionViewCellを持っている、埋め込みUICollectionViewで、埋め込みUICollectionViewでUITableViewが動作しません。

tableView.estimatedRowHeight = 44 
tableView.rowHeight = UITableViewAutomaticDimension 

を3番目のセルの場合:私はそれを設定することで、動的になりたいです。

私は私のプロジェクト、uicollectionviewcellリターン(44、44)を実行し、これらのエラーを表示する:進歩で

The behavior of the UICollectionViewFlowLayout is not defined because: 
the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values. 
The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7fe028c25bd0>, and it is attached to <UICollectionView: 0x7fe029884800; frame = (20 0; 335 44); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x60000024bbb0>; layer = <CALayer: 0x6000002269c0>; contentOffset: {0, 0}; contentSize: {0, 44}> collection view layout: <UICollectionViewFlowLayout: 0x7fe028c25bd0>. 
Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger. 

enter image description here

感謝を。

+0

何が質問ですか? – Krumelur

答えて

0

まあデバッガが間違っている何を言っている:

frame = (20 0; 335 44)

これはあなたのcollectionViewフレームであり、これはcollectionViewの高さはまた、あなたのセルの高さだけ44px、であることを意味します。だから、

は、あなたのコレクションビューのあなたのcollectionViewフレームとのautolayout制約

0

増加の高さを確認するか、あなたのためにあなたのコレクションビューのあなたのセルの高さを低く...セルのインセット値を持つcollectionViewに収まりませんコレクションビューの高さは44で、セルの高さも44です。あなたのセルまたはアイテムの高さはコレクションビューの高さより低くなければなりません!!

関連する問題