IGListBindingSectionControllerSelectionDelegate
Objective-C
@protocol IGListBindingSectionControllerSelectionDelegate <NSObject>
Swift
@MainActor protocol ListBindingSectionControllerSelectionDelegate : NSObjectProtocol
A protocol that handles cell selection events in an IGListBindingSectionController.
-
Tells the delegate that a cell at a given index was selected.
Declaration
Objective-C
- (void)sectionController: (nonnull IGListBindingSectionController *)sectionController didSelectItemAtIndex:(NSInteger)index viewModel:(nonnull id)viewModel;Swift
func sectionController(_ sectionController: IGListBindingSectionController, didSelectItemAt index: Int, viewModel: Any)Parameters
sectionControllerThe section controller the selection occurred in.
indexThe index of the selected cell.
viewModelThe view model that was bound to the cell.
-
Tells the delegate that a cell at a given index was deselected.
Declaration
Objective-C
- (void)sectionController: (nonnull IGListBindingSectionController *)sectionController didDeselectItemAtIndex:(NSInteger)index viewModel:(nonnull id)viewModel;Swift
func sectionController(_ sectionController: IGListBindingSectionController, didDeselectItemAt index: Int, viewModel: Any)Parameters
sectionControllerThe section controller the deselection occurred in.
indexThe index of the deselected cell.
viewModelThe view model that was bound to the cell.
-
Tells the delegate that a cell at a given index was highlighted.
Declaration
Objective-C
- (void)sectionController: (nonnull IGListBindingSectionController *)sectionController didHighlightItemAtIndex:(NSInteger)index viewModel:(nonnull id)viewModel;Swift
func sectionController(_ sectionController: IGListBindingSectionController, didHighlightItemAt index: Int, viewModel: Any)Parameters
sectionControllerThe section controller the highlight occurred in.
indexThe index of the highlighted cell.
viewModelThe view model that was bound to the cell.
-
Tells the delegate that a cell at a given index was unhighlighted.
Declaration
Objective-C
- (void)sectionController: (nonnull IGListBindingSectionController *)sectionController didUnhighlightItemAtIndex:(NSInteger)index viewModel:(nonnull id)viewModel;Swift
func sectionController(_ sectionController: IGListBindingSectionController, didUnhighlightItemAt index: Int, viewModel: Any)Parameters
sectionControllerThe section controller the unhighlight occurred in.
indexThe index of the unhighlighted cell.
viewModelThe view model that was bound to the cell.
-
Tells the delegate that a cell has requested a menu configuration.
Declaration
Objective-C
- (UIContextMenuConfiguration *_Nullable) sectionController: (nonnull IGListBindingSectionController *) sectionController contextMenuConfigurationForItemAtIndex:(NSInteger)index point:(CGPoint)point viewModel:(nonnull id)viewModel;Swift
optional func sectionController(_ sectionController: IGListBindingSectionController, contextMenuConfigurationForItemAt index: Int, point: CGPoint, viewModel: Any) -> UIContextMenuConfiguration?Parameters
sectionControllerThe section controller the request of a menu configuration occurred in.
indexThe index of the cell that is being longed tap.
pointThe point of the tap on the cell.
viewModelThe view model that was bound to the cell.
Return Value
An object that conforms to
UIContextMenuConfiguration.
View on GitHub