mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-20 15:58:28 +00:00
40 lines
1.1 KiB
Mathematica
40 lines
1.1 KiB
Mathematica
|
|
/**
|
||
|
|
* 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 "IGListTestAdapterReorderingDataSource.h"
|
||
|
|
|
||
|
|
#import <IGListKit/IGListAdapter.h>
|
||
|
|
|
||
|
|
#import "IGTestReorderableSection.h"
|
||
|
|
|
||
|
|
@implementation IGListTestAdapterReorderingDataSource
|
||
|
|
|
||
|
|
- (NSArray *)objectsForListAdapter:(IGListAdapter *)listAdapter {
|
||
|
|
return self.objects;
|
||
|
|
}
|
||
|
|
|
||
|
|
- (IGListSectionController *)listAdapter:(IGListAdapter *)listAdapter sectionControllerForObject:(id)object {
|
||
|
|
return [IGTestReorderableSection new];
|
||
|
|
}
|
||
|
|
|
||
|
|
- (nullable UIView *)emptyViewForListAdapter:(nonnull IGListAdapter *)listAdapter {
|
||
|
|
return self.backgroundView;
|
||
|
|
}
|
||
|
|
|
||
|
|
#pragma mark - IGListAdapterMoveDelegate
|
||
|
|
|
||
|
|
- (void)listAdapter:(IGListAdapter *)listAdapter
|
||
|
|
moveObject:(id)object
|
||
|
|
from:(NSArray *)previousObjects
|
||
|
|
to:(NSArray *)objects {
|
||
|
|
self.objects = objects;
|
||
|
|
}
|
||
|
|
|
||
|
|
@end
|