mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-19 07:18:26 +00:00
Summary: * Issue: `[IGListAdapter scrollToObject ...]` currently calls `[collectionView layoutIfNeeded]` before scrolling which creates the current visible cells that will no longer be visible after the scroll. This causes perf issues when we scroll immediately after creating the view controller. * Fix: Instead of asking the layout object for the attributes, lets go throught the `UICollectionView`. So if the attributes are not ready, the `UICollectionView` will call `-prepareLayout`, return the attributes, but doesn't generate the cells just yet. Differential Revision: D17326459 fbshipit-source-id: 745942225e0311fea7c3efb07ac1e8b8e0a82996
25 lines
793 B
Objective-C
25 lines
793 B
Objective-C
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
* 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 <IGListKit/IGListSectionController.h>
|
|
|
|
|
|
@interface IGListTestSection : IGListSectionController
|
|
|
|
@property (nonatomic, assign) NSInteger items;
|
|
@property (nonatomic, assign) CGSize size;
|
|
@property (nonatomic, assign) BOOL wasSelected;
|
|
@property (nonatomic, assign) BOOL wasDeselected;
|
|
@property (nonatomic, assign) BOOL wasHighlighted;
|
|
@property (nonatomic, assign) BOOL wasUnhighlighted;
|
|
@property (nonatomic, assign) BOOL wasDisplayed;
|
|
|
|
@end
|