Things I want to do
Duplicate a CollectionView From ControllerA to ControllerB in storyboard
Things I have done
Duplicate(CMD+D) CollectionView From ControllerA(which works fine) Drag Drop to ControllerB
retarget(ctrl + drag) dataSource and delegate to ControllerB
It should be
duplicated collectionView should work fine like it in ControllerA
But result is
numberOfSectionsInCollectionView
and numberOfItemsInSection
are called
But cellForItemAtIndexPath
not called
Edit 1
the problem looks like related to the frame size of the CollectionView
CollectionView: size(320,50) flow layout,scroll horizontal
CollectionViewCell: size(50,50)
If I drag CollectionView height to 65,it works with a warning:(cellForItemAtIndexPath
called)
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.
if CollectionView height >= 114,works without warning.
ControllerA with same parameters size(320,50) will work.don't know why
Edit 2
if I duplicate the CollectionView with all same settings and retarget to same delegate. the duplicate one doesn't work as expected. But the original one works!! weird!!