Skip to content
This repository was archived by the owner on Oct 31, 2019. It is now read-only.

Commit 8b4ea9a

Browse files
committed
fix bugs in iOS 9 when collectionview has supplementary elements
1 parent cd0acbb commit 8b4ea9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DraggableCollectionView/Helpers/LSCollectionViewLayoutHelper.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ - (void)rearrangeIndexPathOfLayoutAttributesForElements:(NSArray *)elements
135135

136136
NSArray *sortedArray = [[NSArray arrayWithArray:indexPathArray] sortedArrayUsingComparator:cmptr];
137137

138-
for (NSInteger index = 0; index < sortedArray.count && index < sortedArray.count; ++index) {
138+
for (NSInteger index = 0; index < sortedArray.count; ++index) {
139139
((UICollectionViewLayoutAttributes*)[elements objectAtIndex:index]).indexPath = (NSIndexPath *)[sortedArray objectAtIndex:index];
140140
}
141141
}

0 commit comments

Comments
 (0)