EDIT (modified response after further clarification)
I did with table views here . Basically, you call scrollRectToVisible:animated: rectangle that will position your scroll view where you want it to end. For accurate positioning, I think you just need to calculate a rectangle of the same size as your view. Please note: if the content size will change, the rectangle should be calculated in the expected final size of the content.
ORIGINAL RESPONSE
You can change the layout generated by the layoutAttributesForElementsInRect:rect overriding layoutAttributesForElementsInRect:rect like this:
- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect { NSArray *poses = [super layoutAttributesForElementsInRect:rect]; if (<test whether we want to modify poses>) { UICollectionViewLayoutAttributes *pose = poses[<index of pose to be modified>]; pose.frame = <some other frame>;
You also need to override layoutAttributesForItemAtIndexPath using similar logic. The next step will be to invalidate or replace the layout when you want changes to occur. You also need to pass some information. The layout must know what to do so that you can pass it the appropriate data or extend UICollectionViewDelegateFlowLayout1 .
source share