I'm trying to expand a cell vertically when pressed. At the moment the cell expands, but it just overlaps the other cells around it.
Any suggestion on how to use constraints to have the other cells adjust for this change in size?
Here is the code I am using:
UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath];
[UIView transitionWithView:collectionView
duration:.5
options:UIViewAnimationCurveEaseIn
animations:^{
cell.frame = CGRectMake(cell.frame.origin.x, cell.frame.origin.y, 500, cell.frame.size.height);
[cell setBackgroundColor:[UIColor greenColor]];
} completion:^(BOOL finished) {
}];
EDIT: This is not a duplicate as the previous question does not solve my issue.