mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-12 17:30:34 +00:00
* Reimplement IGListKit support in a cleaner way * Rename and fix some stuff * Fix supplementaries more * Update docs * Update test * Cleanup minor things * Tweak it * Indentation * Remove irrelevant changes * Break out cell into its own file * Fix indentation * Address feedback
55 lines
2.0 KiB
Objective-C
55 lines
2.0 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/ASDataController.h>
|
|
#import <AsyncDisplayKit/ASDimension.h>
|
|
|
|
@class ASDisplayNode;
|
|
@class ASCollectionDataController;
|
|
@protocol ASDataControllerSource;
|
|
@protocol ASSectionContext;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@protocol ASCollectionDataControllerSource <ASDataControllerSource>
|
|
|
|
/**
|
|
The constrained size range for layout.
|
|
*/
|
|
- (ASSizeRange)dataController:(ASCollectionDataController *)dataController constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
- (NSArray *)supplementaryNodeKindsInDataController:(ASCollectionDataController *)dataController sections:(NSIndexSet *)sections;
|
|
|
|
- (NSUInteger)dataController:(ASCollectionDataController *)dataController supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section;
|
|
|
|
- (nullable id<ASSectionContext>)dataController:(ASCollectionDataController *)dataController contextForSection:(NSInteger)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 : ASDataController
|
|
|
|
- (instancetype)initWithDataSource:(id<ASCollectionDataControllerSource>)dataSource eventLog:(nullable ASEventLog *)eventLog NS_DESIGNATED_INITIALIZER;
|
|
|
|
- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath;
|
|
|
|
- (nullable id<ASSectionContext>)contextForSection:(NSInteger)section;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|