Skip to content

Commit e662826

Browse files
author
Jerome Boursier
committed
Changed nullable keyword to _Nullable and added a missing return
1 parent 7c8641d commit e662826

8 files changed

+11
-11
lines changed

Source/IGListKit/IGListBindingSectionController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ - (void)didUnhighlightItemAtIndex:(NSInteger)index {
151151
}
152152

153153
#if !TARGET_OS_TV
154-
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
154+
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
155155
return [self.selectionDelegate sectionController:self contextMenuConfigurationForItemAtIndex:index point:point viewModel:self.viewModels[index]];
156156
}
157157
#endif

Source/IGListKit/IGListBindingSectionControllerSelectionDelegate.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ didUnhighlightItemAtIndex:(NSInteger)index
7171
7272
@return An object that conforms to `UIContextMenuConfiguration`.
7373
*/
74-
- (nullable UIContextMenuConfiguration *)sectionController:(IGListBindingSectionController *)sectionController
75-
contextMenuConfigurationForItemAtIndex:(NSInteger)index
76-
point:(CGPoint)point
77-
viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);
74+
- (UIContextMenuConfiguration * _Nullable)sectionController:(IGListBindingSectionController *)sectionController
75+
contextMenuConfigurationForItemAtIndex:(NSInteger)index
76+
point:(CGPoint)point
77+
viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);
7878

7979
@end
8080

Source/IGListKit/IGListSectionController.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ NS_SWIFT_NAME(ListSectionController)
121121
122122
@note The default implementation does nothing. **Calling super is not required.**
123123
*/
124-
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);
124+
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);
125125

126126
/**
127127
Identifies whether an object can be moved through interactive reordering.

Source/IGListKit/IGListSectionController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ - (void)didHighlightItemAtIndex:(NSInteger)index {}
8888

8989
- (void)didUnhighlightItemAtIndex:(NSInteger)index {}
9090

91-
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
91+
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
9292
return nil;
9393
}
9494

Source/IGListKit/Internal/IGListAdapter+UICollectionView.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ - (UIContextMenuConfiguration *)collectionView:(UICollectionView *)collectionVie
240240
// forward this method to the delegate b/c this implementation will steal the message from the proxy
241241
id<UICollectionViewDelegate> collectionViewDelegate = self.collectionViewDelegate;
242242
if ([collectionViewDelegate respondsToSelector:@selector(collectionView:contextMenuConfigurationForItemAtIndexPath:point:)]) {
243-
[collectionViewDelegate collectionView:collectionView contextMenuConfigurationForItemAtIndexPath:indexPath point:point];
243+
return [collectionViewDelegate collectionView:collectionView contextMenuConfigurationForItemAtIndexPath:indexPath point:point];
244244
}
245245

246246
IGListSectionController * sectionController = [self sectionControllerForSection:indexPath.section];

Tests/Objects/IGListTestSection.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ - (void)didUnhighlightItemAtIndex:(NSInteger)index {
6060
self.wasUnhighlighted = YES;
6161
}
6262

63-
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
63+
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
6464
self.requestedContextMenu = YES;
6565
return nil;
6666
}

Tests/Objects/IGTestBindingWithoutDeselectionDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ - (void)sectionController:(nonnull IGListBindingSectionController *)sectionContr
3232
}
3333

3434

35-
- (nullable UIContextMenuConfiguration *)sectionController:(nonnull IGListBindingSectionController *)sectionController
35+
- (UIContextMenuConfiguration * _Nullable)sectionController:(nonnull IGListBindingSectionController *)sectionController
3636
contextMenuConfigurationForItemAtIndex:(NSInteger)index
3737
point:(CGPoint)point
3838
viewModel:(nonnull id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) {

Tests/Objects/IGTestDiffingSectionController.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ - (void)sectionController:(IGListBindingSectionController *)sectionController di
6565
self.unhighlightedViewModel = viewModel;
6666
}
6767

68-
- (nullable UIContextMenuConfiguration *)sectionController:(IGListBindingSectionController *)sectionController contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) {
68+
- (UIContextMenuConfiguration * _Nullable)sectionController:(IGListBindingSectionController *)sectionController contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point viewModel:(id)viewModel API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos) {
6969
self.contextMenuViewModel = viewModel;
7070
return nil;
7171
}

0 commit comments

Comments
 (0)