首次提交

This commit is contained in:
启星
2025-09-22 18:48:29 +08:00
parent 28ae935e93
commit ae9be0b58e
8941 changed files with 999209 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
//
// ZLCollectionViewLayoutAttributes.m
// ZLCollectionView
//
// Created by zhaoliang chen on 2018/7/9.
// Copyright © 2018 zhaoliang chen. All rights reserved.
//
#import "ZLCollectionViewLayoutAttributes.h"
#import "ZLCollectionReusableView.h"
@implementation ZLCollectionViewLayoutAttributes
@synthesize orginalFrame = _orginalFrame;
+ (instancetype)layoutAttributesForDecorationViewOfKind:(NSString *)decorationViewKind withIndexPath:(NSIndexPath *)indexPath orginalFrmae:(CGRect)orginalFrame{
ZLCollectionViewLayoutAttributes *layoutAttributes = [super layoutAttributesForDecorationViewOfKind:decorationViewKind withIndexPath:indexPath];
[layoutAttributes setValue:[NSValue valueWithCGRect:orginalFrame] forKey:@"orginalFrame"];
layoutAttributes.frame = orginalFrame;
return layoutAttributes;
}
-(CGRect)orginalFrame {
if ([self.representedElementKind isEqualToString:UICollectionElementKindSectionHeader]) {
return _orginalFrame;
} else {
return self.frame;
}
}
@end