mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Complete overhaul of ASFlowLayoutController.
Introduced ASIndexPath for efficient handling of index paths in C++ vectors, while maintaining the readability of ".section" and ".row" instead of ".first" and ".second" inside of complicated business logic. Confirmed that the working range calls are firing appropriately during ASTableViewStressTest, including the deallocation of the rich text placeholders provided by ASTextNode.
This commit is contained in:
@@ -15,12 +15,20 @@ typedef NS_ENUM(NSUInteger, ASFlowLayoutDirection) {
|
||||
ASFlowLayoutDirectionHorizontal,
|
||||
};
|
||||
|
||||
@protocol ASFlowLayoutControllerDataSource
|
||||
|
||||
- (NSArray *)completedNodes; // This provides access to ASDataController's _completedNodes multidimensional array.
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
* The controller for flow layout.
|
||||
* An optimized flow layout controller that supports only vertical or horizontal scrolling, not simultaneously two-dimensional scrolling.
|
||||
* It is used for all ASTableViews, and may be used with ASCollectionView.
|
||||
*/
|
||||
@interface ASFlowLayoutController : ASAbstractLayoutController
|
||||
|
||||
@property (nonatomic, readonly, assign) ASFlowLayoutDirection layoutDirection;
|
||||
@property (nonatomic) id <ASFlowLayoutControllerDataSource> dataSource;
|
||||
|
||||
- (instancetype)initWithScrollOption:(ASFlowLayoutDirection)layoutDirection;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user