0

enter image description here enter image description here

enter image description here

I dragged the UICollectionView in the storyboard , The UICollectionViewCell size then changed to 0,0,0,0.

The height of the UICollectionView is 0,64,375,60.

The height of CollectionView cell is , with deducting top spacing(5) and bottom spacing(5). i.e Size is (55,55)

enter image description here

The scroll direction is horizontal.

Don't know why I don't see the cell.

My Further findings , I found if the CollectionView is outside the View(green border), then it shows up fine. But as soon as I move inside that view the UICollectionViewCell disappears.

enter image description here

4

1 に答える 1

2

最後に問題を見つけました。問題は、そのviewControllerのAdjust Scroll View Insetsがチェックされていたことです。

そのオプションのチェックを外すと、私の問題は解決しました。

ここに画像の説明を入力

于 2016-11-26T23:28:36.613 に答える