mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-06 12:43:58 +00:00
[ASRangeController] We're already on main thread, remove blocks Make data source read-only, clarify what's asynchronous [ASDataController] Clean up some interfaces [ASDataController] A little more cleanup [ASDataController] Cleanup [ASDataController] Restore some changes, exit more often [ASDataController] Use item counts that we already have rather than requerying them [ASDataController] Revert weakifications [ASDataController] Add a mechanism to measure how much work we avoided
47 lines
1.8 KiB
Objective-C
47 lines
1.8 KiB
Objective-C
//
|
|
// ASCollectionDataController.h
|
|
// AsyncDisplayKit
|
|
//
|
|
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
|
|
// This source code is licensed under the BSD-style license found in the
|
|
// LICENSE file in the root directory of this source tree. An additional grant
|
|
// of patent rights can be found in the PATENTS file in the same directory.
|
|
//
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import <AsyncDisplayKit/ASChangeSetDataController.h>
|
|
#import <AsyncDisplayKit/ASDimension.h>
|
|
|
|
@class ASDisplayNode;
|
|
@class ASCollectionDataController;
|
|
@protocol ASDataControllerSource;
|
|
|
|
@protocol ASCollectionDataControllerSource <ASDataControllerSource>
|
|
|
|
/**
|
|
The constrained size range for layout.
|
|
*/
|
|
- (ASSizeRange)dataController:(ASCollectionDataController *)dataController constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
- (NSArray *)supplementaryNodeKindsInDataController:(ASCollectionDataController *)dataController;
|
|
|
|
- (NSUInteger)dataController:(ASCollectionDataController *)dataController numberOfSectionsForSupplementaryNodeOfKind:(NSString *)kind;
|
|
|
|
- (NSUInteger)dataController:(ASCollectionDataController *)dataController supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section;
|
|
|
|
@optional
|
|
|
|
- (ASCellNode *)dataController:(ASCollectionDataController *)dataController supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
- (ASCellNodeBlock)dataController:(ASCollectionDataController *)dataController supplementaryNodeBlockOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
@end
|
|
|
|
@interface ASCollectionDataController : ASChangeSetDataController
|
|
|
|
- (instancetype)initWithDataSource:(id<ASCollectionDataControllerSource>)dataSource NS_DESIGNATED_INITIALIZER;
|
|
|
|
- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
@end |