File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,11 +243,7 @@ - (void)judgeMoreBtnShowWhenShowTwoRows {
243243 // 如果cell宽度或者cell宽度加上间距超过collectionView的contentView宽度,则将cell自成一行
244244 [widthArray addObject: @(contentViewWidth)];
245245 } else {
246- // if (obj != [weakSymptoms lastObject]) {
247- // [widthArray addObject:@(cellWidthAndRightMargin+kCollectionViewCellsHorizonMargin)];
248- // } else {
249246 [widthArray addObject: @(cellWidthAndRightMargin)];
250- // }
251247 }
252248 }];
253249 }
@@ -303,7 +299,8 @@ - (NSUInteger)firstLineCellCountWithArray:(NSArray *)array {
303299 [widthArray addObject: @(cellWidthAndRightMargin)];
304300 NSArray *sumArray = [NSArray arrayWithArray: widthArray];
305301 NSNumber *sum = [sumArray valueForKeyPath: @" @sum.self" ];
306- // 之所以要减去kCollectionViewToRightMargin,是为防止这种情况发生:https://i.imgur.com/6yFPQ8U.gif
302+ // 之所以要减去kCollectionViewToRightMargin,是为防止这种情况发生:
303+ // ⓵https://i.imgur.com/6yFPQ8U.gif ⓶https://i.imgur.com/XzfNVda.png
307304 CGFloat firstRowWidth = [sum floatValue ] - kCollectionViewToRightMargin ;
308305 if ((firstRowWidth <= contentViewWidth)) {
309306 firstLineCellCount++;
You can’t perform that action at this time.
0 commit comments