File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
IBPCollectionViewCompositionalLayout Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -286,20 +286,18 @@ - (void)prepareLayout {
286286 }
287287 }
288288
289- NSArray <IBPNSCollectionLayoutDecorationItem *> *decorationItems = layoutSection.decorationItems ;
290- for (IBPNSCollectionLayoutDecorationItem *decorationItem in decorationItems) {
289+ for (IBPNSCollectionLayoutDecorationItem *decorationItem in layoutSection.decorationItems ) {
291290 UICollectionViewLayoutAttributes *decorationViewAttributes = [UICollectionViewLayoutAttributes layoutAttributesForDecorationViewOfKind: decorationItem.elementKind withIndexPath: [NSIndexPath indexPathForItem: 0 inSection: sectionIndex]];
292291
293292 CGRect decorationViewFrame = CGRectZero;
294293 decorationViewFrame.origin = sectionOrigin;
294+ decorationViewFrame.size = collectionContainer.effectiveContentSize ;
295295
296296 if (self.scrollDirection == UICollectionViewScrollDirectionVertical) {
297- decorationViewFrame.size .width += CGRectGetWidth (contentFrame);
298297 decorationViewFrame.size .height = CGRectGetMaxY (contentFrame) - sectionOrigin.y + layoutSection.contentInsets .bottom ;
299298 }
300299 if (self.scrollDirection == UICollectionViewScrollDirectionHorizontal) {
301- decorationViewFrame.size .width = CGRectGetMaxX (contentFrame) - sectionOrigin.x + layoutSection.contentInsets .trailing ;
302- decorationViewFrame.size .height += CGRectGetHeight (contentFrame);
300+ decorationViewFrame.size .width = CGRectGetMaxX (contentFrame) - sectionOrigin.x ;
303301 }
304302
305303 decorationViewFrame.origin .x += decorationItem.contentInsets .leading ;
You can’t perform that action at this time.
0 commit comments