mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-24 09:48:21 +00:00
Summary: While the `IGListBindingSingleSectionController` class and a nearly complete test suite were present in the IGListKit repo, they weren't imported into Xcode, and so they weren't part of the public release or the test CI. Since the class looks like it's being used within Instagram, it's clear that it's not deprecated. I'm assuming it was added for a specific use-case in Instagram, and integrating it with the public Xcode project was still pending. This diff integrates the class back into the public framework. Reviewed By: candance Differential Revision: D45147758 fbshipit-source-id: b0a84a2909635a4448480246f315243f4fcac134
49 lines
1.4 KiB
Objective-C
49 lines
1.4 KiB
Objective-C
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
#import "IGListSectionController.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
Special section controller that only contains a single item, and it will apply the view model update during -didUpdateObject: call, usually happened inside -[UICollectionView performBatchUpdates:completion:].
|
|
|
|
This class is intended to be subclassed.
|
|
*/
|
|
NS_SWIFT_NAME(ListBindingSingleSectionController)
|
|
@interface IGListBindingSingleSectionController<__covariant ViewModel : id<IGListDiffable>, Cell : UICollectionViewCell *> : IGListSectionController
|
|
|
|
#pragma mark - Subclass
|
|
|
|
// Required to be implemented by subclass.
|
|
- (Class)cellClass;
|
|
|
|
// Required to be implemented by subclass.
|
|
- (void)configureCell:(Cell)cell withViewModel:(ViewModel)viewModel;
|
|
|
|
// Required to be implemented by subclass.
|
|
- (CGSize)sizeForViewModel:(ViewModel)viewModel;
|
|
|
|
// Subclasable. Defaults is no-op.
|
|
- (void)didSelectItemWithCell:(Cell)cell;
|
|
|
|
// Subclasable. Defaults is no-op.
|
|
- (void)didDeselectItemWithCell:(Cell)cell;
|
|
|
|
// Subclasable. Defaults is no-op.
|
|
- (void)didHighlightItemWithCell:(Cell)cell;
|
|
|
|
// Subclasable. Defaults is no-op.0
|
|
- (void)didUnhighlightItemWithCell:(Cell)cell;
|
|
|
|
- (BOOL)isDisplayingCell;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|