I have a collection based layout with different cell sizes depending on the content. A normal cell is 200x200 pixels, but if there is no content, I display a cell with the same size as the collection itself.
I use
- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout *)collectionViewLayout
sizeForItemAtIndexPath:(NSIndexPath *)indexPath
to calculate the correct size.
Be that as it may, my children in the cell do not update its restrictions. The cell is really simple, just UILabel, which should be concentrated inside the supervisor. I have horizontal and vertical centered constraints (also tried to snap each edge to the superwine). The result is that subviews gets the same size and position as in the Builder (Storyboard) interface.
I set the background colors for both the cell and the label, and I see that the cell is getting the correct size, but not on the label.
The problem exists only in iOS7 and works the same way as in iOS8.
Please, help!

source
share