mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-08 13:42:51 +00:00
This ensures memory cleanup happens correctly and introduces a new test project to support developing new features while stressing tough use cases for correctness.
46 lines
896 B
Objective-C
46 lines
896 B
Objective-C
//
|
|
// ASCollectionNode.m
|
|
// AsyncDisplayKit
|
|
//
|
|
// Created by Scott Goodson on 9/5/15.
|
|
// Copyright (c) 2015 Facebook. All rights reserved.
|
|
//
|
|
|
|
#import "ASCollectionNode.h"
|
|
|
|
@implementation ASCollectionNode
|
|
|
|
- (instancetype)init
|
|
{
|
|
ASDISPLAYNODE_NOT_DESIGNATED_INITIALIZER();
|
|
self = [self initWithCollectionViewLayout:nil]; // Will throw an exception for lacking a UICV Layout.
|
|
return nil;
|
|
}
|
|
|
|
- (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout
|
|
{
|
|
if (self = [super initWithViewBlock:^UIView *{ return [[ASCollectionView alloc] initWithCollectionViewLayout:layout]; }]) {
|
|
return self;
|
|
}
|
|
return nil;
|
|
}
|
|
|
|
- (ASCollectionView *)view
|
|
{
|
|
return (ASCollectionView *)[super view];
|
|
}
|
|
|
|
- (void)clearContents
|
|
{
|
|
[super clearContents];
|
|
[self.view clearContents];
|
|
}
|
|
|
|
- (void)clearFetchedData
|
|
{
|
|
[super clearFetchedData];
|
|
[self.view clearFetchedData];
|
|
}
|
|
|
|
@end
|