1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-03 09:57:46 +01:00
Telegram/Telegraph/TGStickerAssociatedPanelCollectionLayout.m
2015-10-01 19:19:52 +03:00

29 lines
866 B
Objective-C

#import "TGStickerAssociatedPanelCollectionLayout.h"
@interface TGStickerAssociatedPanelCollectionLayout ()
{
bool _updatingCollectionItems;
}
@end
@implementation TGStickerAssociatedPanelCollectionLayout
- (UICollectionViewLayoutAttributes *)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath
{
if (_updatingCollectionItems || itemIndexPath.section != 0)
return [super initialLayoutAttributesForAppearingItemAtIndexPath:itemIndexPath];
return nil;
}
- (UICollectionViewLayoutAttributes *)finalLayoutAttributesForDisappearingItemAtIndexPath:(NSIndexPath *)itemIndexPath
{
if (_updatingCollectionItems || itemIndexPath.section != 0)
return [super finalLayoutAttributesForDisappearingItemAtIndexPath:itemIndexPath];
return [self layoutAttributesForItemAtIndexPath:itemIndexPath];
}
@end