Questions tagged uicollectionviewflowlayout

Explore the latest questions and answers asked by our top developers.

Self Sizing CollectionView cell not work properly after reload data

I am creating a collectionView that can have multiple sections with a self-sizing cell. it works nicely on the initial layout. but after reload, I encounter three problem Scrolling become choppy cell size changed and cell overlap with each other content offset changed after reload data here is ViewController code class ViewController: UIViewController { @IBOutlet […]

UIViewAlertForUnsatisfiableConstraints errors when working with dynamic header size UICollectionView

Intro Hey there, I am trying to give the header cell of my collectionView a dynamic cell sizing. The cell that is used as a header is also used as a “regular” cell in another collectionView. In there, working with a dynamic cell sizing works just fine. This is how the collectionView is created: private […]

Pin section headers in eureka formviewcontroller

I have successfully pinned section headers in UICollectionView by setting sectionHeadersPinToVisibleBounds = true for UICollectionViewFlowLayout and subclassing UICollectionReusableView. Is it possible to do something similar when working with Eureka’s FormViewController? My end goal is to have pinned section headers for each section. I am using a custom Section by stying UIView like this: (Please note […]

UICollectionViewCell not forcing Cell Size

I am using func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: 400, height: 600) } to specify my CollectionView’s cell sizes. It works fine but as soon as I add a width constraint (UILabel.width == ContentView.width) to my UILabel inside the ContentView of the cell, the cell’s width […]

By Kashif
Categorised as autolayout, swift, uicollectionview, uicollectionviewflowlayout

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us