mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-22 16:58:23 +00:00
Summary: Mainly this addresses clarity of a few comments, line breaks at weird places, and style differences within a single file. Just comments and including JetBrains `.idea` config folder in the `gitignore`. - [X] All tests pass. Demo project builds and runs. - [X] I added tests, an experiment, or detailed why my change isn't tested. - [N/A] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes. - [N/A] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md) Closes https://github.com/Instagram/IGListKit/pull/600 Differential Revision: D4810628 Pulled By: jessesquires fbshipit-source-id: fce445c0253f592a43045ae098e440d41c166993
58 lines
2 KiB
Objective-C
58 lines
2 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>
|
|
|
|
#import <IGListKit/IGListAdapterUpdaterDelegate.h>
|
|
#import <IGListKit/IGListExperiments.h>
|
|
#import <IGListKit/IGListMacros.h>
|
|
#import <IGListKit/IGListUpdatingDelegate.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
An `IGListAdapterUpdater` is a concrete type that conforms to `IGListUpdatingDelegate`.
|
|
It is an out-of-box updater for `IGListAdapter` objects to use.
|
|
|
|
@note This updater performs re-entrant, coalesced updating for a list. It also uses a least-minimal diff
|
|
for calculating UI updates when `IGListAdapter` calls
|
|
`-performUpdateWithCollectionView:fromObjects:toObjects:completion:`.
|
|
*/
|
|
IGLK_SUBCLASSING_RESTRICTED
|
|
@interface IGListAdapterUpdater : NSObject <IGListUpdatingDelegate>
|
|
|
|
/**
|
|
The delegate that receives events with data on the performance of a transition.
|
|
*/
|
|
@property (nonatomic, weak) id<IGListAdapterUpdaterDelegate> delegate;
|
|
|
|
/**
|
|
A flag indicating if a move should be treated as a "delete, then insert" operation.
|
|
*/
|
|
@property (nonatomic, assign) BOOL movesAsDeletesInserts;
|
|
|
|
/**
|
|
A flag indicating whether this updater should skip diffing and simply call
|
|
`reloadData` for updates when the collection view is not in a window. The default value is `YES`.
|
|
|
|
@note This will result in better performance, but will not generate the same delegate
|
|
callbacks. If using a custom layout, it will not receive `prepareForCollectionViewUpdates:`.
|
|
|
|
@warning On iOS < 8.3, this behavior is unsupported and will always be treated as `NO`.
|
|
*/
|
|
@property (nonatomic, assign) BOOL allowsBackgroundReloading;
|
|
|
|
/**
|
|
A bitmask of experiments to conduct on the updater.
|
|
*/
|
|
@property (nonatomic, assign) IGListExperiment experiments;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|