1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-04 02:17:51 +01:00
Telegram/Telegraph/TGStickerAssociatedPanelCollectionLayout.m

29 lines
866 B
Mathematica
Raw Normal View History

2015-10-01 18:19:52 +02:00
#import "TGStickerAssociatedPanelCollectionLayout.h"
2014-07-10 16:11:09 +02:00
2015-10-01 18:19:52 +02:00
@interface TGStickerAssociatedPanelCollectionLayout ()
2014-07-10 16:11:09 +02:00
{
bool _updatingCollectionItems;
}
@end
2015-10-01 18:19:52 +02:00
@implementation TGStickerAssociatedPanelCollectionLayout
2014-07-10 16:11:09 +02:00
- (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