diff --git a/Source/IGListKit/IGListBindingSectionController.m b/Source/IGListKit/IGListBindingSectionController.m index 7e5ec7a95..340dfb92a 100644 --- a/Source/IGListKit/IGListBindingSectionController.m +++ b/Source/IGListKit/IGListBindingSectionController.m @@ -155,7 +155,7 @@ - (void)didUnhighlightItemAtIndex:(NSInteger)index { } #if !TARGET_OS_TV -- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point { +- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point { return [self.selectionDelegate sectionController:self contextMenuConfigurationForItemAtIndex:index point:point viewModel:self.viewModels[index]]; } #endif diff --git a/Source/IGListKit/IGListBindingSectionControllerSelectionDelegate.h b/Source/IGListKit/IGListBindingSectionControllerSelectionDelegate.h index b9ab25bbf..b06015715 100644 --- a/Source/IGListKit/IGListBindingSectionControllerSelectionDelegate.h +++ b/Source/IGListKit/IGListBindingSectionControllerSelectionDelegate.h @@ -71,10 +71,10 @@ didUnhighlightItemAtIndex:(NSInteger)index @return An object that conforms to `UIContextMenuConfiguration`. */ -- (nullable UIContextMenuConfiguration *)sectionController:(IGListBindingSectionController *)sectionController - contextMenuConfigurationForItemAtIndex:(NSInteger)index - point:(CGPoint)point - viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos); +- (UIContextMenuConfiguration * _Nullable)sectionController:(IGListBindingSectionController *)sectionController + contextMenuConfigurationForItemAtIndex:(NSInteger)index + point:(CGPoint)point + viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos); @end diff --git a/Source/IGListKit/IGListSectionController.h b/Source/IGListKit/IGListSectionController.h index edf05d68d..6f4828f15 100644 --- a/Source/IGListKit/IGListSectionController.h +++ b/Source/IGListKit/IGListSectionController.h @@ -139,7 +139,7 @@ NS_SWIFT_NAME(ListSectionController) @note The default implementation does nothing. **Calling super is not required.** */ -- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos); +- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos); /** Identifies whether an object can be moved through interactive reordering. diff --git a/Source/IGListKit/IGListSectionController.m b/Source/IGListKit/IGListSectionController.m index 05dab42e8..54d17c064 100644 --- a/Source/IGListKit/IGListSectionController.m +++ b/Source/IGListKit/IGListSectionController.m @@ -101,7 +101,7 @@ - (void)didHighlightItemAtIndex:(NSInteger)index {} - (void)didUnhighlightItemAtIndex:(NSInteger)index {} -- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point { +- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point { return nil; } diff --git a/Source/IGListKit/Internal/IGListAdapter+UICollectionView.m b/Source/IGListKit/Internal/IGListAdapter+UICollectionView.m index 9510f026f..7bb8b989e 100644 --- a/Source/IGListKit/Internal/IGListAdapter+UICollectionView.m +++ b/Source/IGListKit/Internal/IGListAdapter+UICollectionView.m @@ -284,7 +284,7 @@ - (UIContextMenuConfiguration *)collectionView:(UICollectionView *)collectionVie // forward this method to the delegate b/c this implementation will steal the message from the proxy id collectionViewDelegate = self.collectionViewDelegate; if ([collectionViewDelegate respondsToSelector:@selector(collectionView:contextMenuConfigurationForItemAtIndexPath:point:)]) { - [collectionViewDelegate collectionView:collectionView contextMenuConfigurationForItemAtIndexPath:indexPath point:point]; + return [collectionViewDelegate collectionView:collectionView contextMenuConfigurationForItemAtIndexPath:indexPath point:point]; } IGListSectionController * sectionController = [self sectionControllerForSection:indexPath.section]; diff --git a/Tests/Objects/IGListTestSection.m b/Tests/Objects/IGListTestSection.m index 806b7658f..b4dd9e261 100644 --- a/Tests/Objects/IGListTestSection.m +++ b/Tests/Objects/IGListTestSection.m @@ -60,7 +60,7 @@ - (void)didUnhighlightItemAtIndex:(NSInteger)index { self.wasUnhighlighted = YES; } -- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point { +- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point { self.requestedContextMenu = YES; return nil; } diff --git a/Tests/Objects/IGTestBindingWithoutDeselectionDelegate.m b/Tests/Objects/IGTestBindingWithoutDeselectionDelegate.m index 89a3d57f1..43586b712 100644 --- a/Tests/Objects/IGTestBindingWithoutDeselectionDelegate.m +++ b/Tests/Objects/IGTestBindingWithoutDeselectionDelegate.m @@ -32,7 +32,7 @@ - (void)sectionController:(nonnull IGListBindingSectionController *)sectionContr } -- (nullable UIContextMenuConfiguration *)sectionController:(nonnull IGListBindingSectionController *)sectionController +- (UIContextMenuConfiguration * _Nullable)sectionController:(nonnull IGListBindingSectionController *)sectionController contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point viewModel:(nonnull id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) { diff --git a/Tests/Objects/IGTestDiffingSectionController.m b/Tests/Objects/IGTestDiffingSectionController.m index df5b18260..018990a34 100644 --- a/Tests/Objects/IGTestDiffingSectionController.m +++ b/Tests/Objects/IGTestDiffingSectionController.m @@ -65,7 +65,7 @@ - (void)sectionController:(IGListBindingSectionController *)sectionController di self.unhighlightedViewModel = viewModel; } -- (nullable UIContextMenuConfiguration *)sectionController:(IGListBindingSectionController *)sectionController contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) { +- (UIContextMenuConfiguration * _Nullable)sectionController:(IGListBindingSectionController *)sectionController contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) { self.contextMenuViewModel = viewModel; return nil; }