mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Remove numberOfSectionsForSupplementaryNodeOfKind: Method (#2102)
* Add unit test to confirm that supplementary items must be contained within actual sections * [ASLayoutInspecting] Deprecate collectionView:numberOfSectionsForSupplementaryNodeOfKind: * Add another test to dig deeper into UICollectionView
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
[self deleteSectionsOfKind:kind atIndexSet:indexSet completion:nil];
|
||||
|
||||
// Insert each section
|
||||
NSUInteger sectionCount = [self.collectionDataSource dataController:self numberOfSectionsForSupplementaryNodeOfKind:kind];
|
||||
NSUInteger sectionCount = self.itemCountsFromDataSource.size();
|
||||
NSMutableArray *sections = [NSMutableArray arrayWithCapacity:sectionCount];
|
||||
for (int i = 0; i < sectionCount; i++) {
|
||||
[sections addObject:[NSMutableArray array]];
|
||||
@@ -194,7 +194,7 @@
|
||||
ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection;
|
||||
|
||||
id<ASCollectionDataControllerSource> source = self.collectionDataSource;
|
||||
NSUInteger sectionCount = [source dataController:self numberOfSectionsForSupplementaryNodeOfKind:kind];
|
||||
NSUInteger sectionCount = self.itemCountsFromDataSource.size();
|
||||
for (NSUInteger i = 0; i < sectionCount; i++) {
|
||||
NSUInteger rowCount = [source dataController:self supplementaryNodesOfKind:kind inSection:i];
|
||||
for (NSUInteger j = 0; j < rowCount; j++) {
|
||||
|
||||
Reference in New Issue
Block a user