# IGListBindingSectionControllerSelectionDelegate Protocol Reference

# IGListBindingSectionControllerSelectionDelegate

Objective-C

    @protocol IGListBindingSectionControllerSelectionDelegate <NSObject>

Swift

    protocol ListBindingSectionControllerSelectionDelegate : NSObjectProtocol

A protocol that handles cell selection events in an `IGListBindingSectionController`.

- `-sectionController:didSelectItemAtIndex:viewModel:`

  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

  `sectionController` | The section controller the selection occurred in.
  `index` | The index of the selected cell.
  `viewModel` | The view model that was bound to the cell.

- `-sectionController:didDeselectItemAtIndex:viewModel:`

  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

  `sectionController` | The section controller the deselection occurred in.
  `index` | The index of the deselected cell.
  `viewModel` | The view model that was bound to the cell.

- `-sectionController:didHighlightItemAtIndex:viewModel:`

  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

  `sectionController` | The section controller the highlight occurred in.
  `index` | The index of the highlighted cell.
  `viewModel` | The view model that was bound to the cell.

- `-sectionController:didUnhighlightItemAtIndex:viewModel:`

  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

  `sectionController` | The section controller the unhighlight occurred in.
  `index` | The index of the unhighlighted cell.
  `viewModel` | The view model that was bound to the cell.

© 2024 Instagram. All rights reserved. (Last updated: 2024-05-13)

Generated by jazzy ♪♫ v0.15.0, a Realm project.