I'm making an paging UICollectionView
and use KRLCollectionViewGridLayout
for custom 3x3 grid layout. Everything in first page run perfectly like image below with this settings:
KRLCollectionViewGridLayout *flowLayout = [[KRLCollectionViewGridLayout alloc] init];
flowLayout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
flowLayout.aspectRatio = 1;
flowLayout.sectionInset = UIEdgeInsetsMake(2, 25, 10, 15);
flowLayout.interitemSpacing = 25;
flowLayout.lineSpacing = 25;
flowLayout.numberOfItemsPerLine = 3;
But when I'm scrolled to second page, the problem start: The content offset of my collection being misaligned like this image, it isn't grid 3x3 anymore:
I take a night for research the solution but seem like they're not help me to solve this problem. How can I fix it now?