I have a custom flow layout. I know where my cells need to be. I currently create specific frames for each cell. However, I'm worried about different sized iPhones so I want to explore creating constraints. I know this has to be done in the function prepareForLayout().
override func prepareLayout() {
for item in 0 ..< collectionView!.numberOfItemsInSection(0){
let indexPath = NSIndexPath(forItem: item, inSection: 0)
let attributes = UICollectionViewLayoutAttributes(forCellWithIndexPath: indexPath)
cache.append(attributes)
}
//This is where I want to do work for creating constraints for my cells
}
I guess the question is can you create constraints between cells when creating your own custom flow layout