Open muratyilmaz opened 7 years ago
@muratyilmaz, Verified warning and getting the same issue in the demo project, any ideas to fixing this error?
@leojkwan This warning is annoying. Once you have to override "viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator)" function in your ViewController class. Then, inside that function,you have to invalidate your layout in order to recreate and equalize zero sectionInset property of your layout.
Then, implement UICollectionViewDelegateFlowLayout
collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize
Inside above function, recalculate item size.
i'am sory. My english is not very well. i hope, you can understand :)
cek your Insets, maybe like this, u must be set to 0
self.colectionView1.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
or this
i hope help you
Hi, When i rotate device to landscape mode always taking this warning? Thanks.
The behavior of the UICollectionViewFlowLayout is not defined because: 2017-01-24 02:57:44.553 UPCarouselFlowLayoutDemo[32030:325685] 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.