IGListKit/Source/IGListCollectionView.h
Ryan Nystrom f536e2136d Generate 3.2 docs
Summary:
Does this need to wait for #1086?
Closes https://github.com/Instagram/IGListKit/pull/1085

Differential Revision: D6917735

Pulled By: rnystrom

fbshipit-source-id: 08165c8d9f1215abac1d4bc7c65c1d23e31f758a
2018-02-06 15:47:20 -08:00

49 lines
1.7 KiB
Objective-C

/**
* Copyright (c) 2016-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>
@class IGListCollectionViewLayout;
NS_ASSUME_NONNULL_BEGIN
/**
This `UICollectionView` subclass allows for partial layout invalidation using `IGListCollectionViewLayout`.
@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.
@note You can initialize a new view with a base layout by simply calling `-[IGListCollectionView initWithFrame:]`.
*/
- (instancetype)initWithFrame:(CGRect)frame listCollectionViewLayout:(IGListCollectionViewLayout *)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