I have a UICollectionView
in a UITableViewCell
. The height of the table view cell is set to the height of the collection view so the collection view only scrolls horizontally.
Sometimes when scrolling in the table view the collection view will capture the vertical scrolls and bounce scroll vertically. I've set the height
to 0
in -collectionViewContentSize
in my custom layout.
How do I completely disable vertical scrolling in a collection view?
In your storyboard - click your UICollectionView
and open Utilities. Under the Attributes Inspector, center button, look to 'Bounces'. Uncheck "Bounces Vertically".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With