Skip to content

Commit 95fb46b

Browse files
Jerome BoursierTimOliver
authored andcommitted
Changed nullable keyword to _Nullable and added a missing return
1 parent 5d7936b commit 95fb46b

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
@@ -155,7 +155,7 @@ - (void)didUnhighlightItemAtIndex:(NSInteger)index {
155155
}
156156

157157
#if !TARGET_OS_TV
158-
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
158+
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
159159
return [self.selectionDelegate sectionController:self contextMenuConfigurationForItemAtIndex:index point:point viewModel:self.viewModels[index]];
160160
}
161161
#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
@@ -139,7 +139,7 @@ NS_SWIFT_NAME(ListSectionController)
139139
140140
@note The default implementation does nothing. **Calling super is not required.**
141141
*/
142-
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);
142+
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(tvos);
143143

144144
/**
145145
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
@@ -101,7 +101,7 @@ - (void)didHighlightItemAtIndex:(NSInteger)index {}
101101

102102
- (void)didUnhighlightItemAtIndex:(NSInteger)index {}
103103

104-
- (nullable UIContextMenuConfiguration *)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
104+
- (UIContextMenuConfiguration * _Nullable)contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point {
105105
return nil;
106106
}
107107

Source/IGListKit/Internal/IGListAdapter+UICollectionView.m

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

290290
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)