mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-24 09:48:21 +00:00
Summary: The standardized Meta copyright notice is "Copyright (c) Meta Platforms, Inc. and affiliates." and not "Copyright (c) Meta Platforms, Inc. and its affiliates." (Dropping the "its") This diff updates the copyright notice in each source file to the correct this. Reviewed By: willbailey Differential Revision: D44737667 fbshipit-source-id: 643bf36df76723e70d9d826c53cf8f29b8a0c8cc
49 lines
1.8 KiB
Objective-C
49 lines
1.8 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>
|
|
|
|
@protocol IGListCollectionViewLayoutCompatible;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
This `UICollectionView` subclass allows for partial layout invalidation using `IGListCollectionViewLayout`,
|
|
or custom layout classes that conform to IGListCollectionViewLayoutCompatible.
|
|
|
|
@note When updating a collection view (ex: calling `-insertSections`), `-invalidateLayoutWithContext` gets called on
|
|
the layout object. However, the invalidation context doesn't provide details on which index paths are being modified,
|
|
which typically forces a full layout re-calculation. `IGListCollectionView` gives `IGListCollectionViewLayout` the
|
|
missing information to re-calculate only the modified layout attributes.
|
|
*/
|
|
NS_SWIFT_NAME(ListCollectionView)
|
|
@interface IGListCollectionView : UICollectionView
|
|
|
|
/**
|
|
Create a new view with an `IGListcollectionViewLayout` class or subclass.
|
|
|
|
@param frame The frame to initialize with.
|
|
@param collectionViewLayout The layout to use with the collection view. You can use IGListCollectionViewLayout
|
|
here, or a custom layout class that conforms to IGListCollectionViewLayoutCompatible.
|
|
|
|
@note You can initialize a new view with a base layout by simply calling `-[IGListCollectionView initWithFrame:]`.
|
|
*/
|
|
- (instancetype)initWithFrame:(CGRect)frame listCollectionViewLayout:(UICollectionViewLayout<IGListCollectionViewLayoutCompatible> *)collectionViewLayout NS_DESIGNATED_INITIALIZER;
|
|
|
|
/**
|
|
:nodoc:
|
|
*/
|
|
- (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)collectionViewLayout NS_UNAVAILABLE;
|
|
|
|
/**
|
|
:nodoc:
|
|
*/
|
|
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|