I have a added a UICollectionView to my UIViewController and have made a custom cell for it.
I set the size of the cell using the siz
Thanks to the great tip by vin047.
In our case I found that the super-call-order issue was the problem.
But with the overall table view (or collection view). Not in the cell as such.
class UnusualCollectionView: UICollectionView {
override func layoutSubviews() {
super.layoutSubviews()
contentInset = UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 0)
}
class UnusualCollectionView: UICollectionView {
override func layoutSubviews() {
contentInset = UIEdgeInsets(top: 10, left: 0, bottom: 10, right: 0)
super.layoutSubviews()
}
The problem caused some profoundly erratic behavior. For example, the 12th cell (no really) was always displaced a long way vertically. Always the 12th cell! Who knows?
vin047 saved the day here, bravo.