iOS: fix flowlayout loadmoreView do not show on content
This commit is contained in:
parent
9531fbffc0
commit
c82510f57a
@ -111,11 +111,15 @@ - (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSInde
|
|||||||
|
|
||||||
if (width == self.collectionView.width) {
|
if (width == self.collectionView.width) {
|
||||||
x = 0;
|
x = 0;
|
||||||
CGFloat maxY = 0;
|
NSNumber *maxYColumn = @(0);
|
||||||
for (NSNumber *column in self.columnHeightInfo.allValues) {
|
for (NSNumber *key in sortedKeys) {
|
||||||
maxY = MAX(maxY, [column floatValue]);
|
if ([self.columnHeightInfo[key] floatValue] > [self.columnHeightInfo[maxYColumn] floatValue]) {
|
||||||
|
maxYColumn = key;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
CGFloat maxY = [self.columnHeightInfo[maxYColumn] floatValue];
|
||||||
y = maxY + self.rowSpace;
|
y = maxY + self.rowSpace;
|
||||||
|
self.columnHeightInfo[maxYColumn] = @(y + height);
|
||||||
} else {
|
} else {
|
||||||
self.columnHeightInfo[minYOfColumn] = @(y + height);
|
self.columnHeightInfo[minYOfColumn] = @(y + height);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user