-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
IGListBindingSectionControllerSelectionDelegate.h
73 lines (58 loc) · 2.42 KB
/
IGListBindingSectionControllerSelectionDelegate.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
@class IGListBindingSectionController;
NS_ASSUME_NONNULL_BEGIN
/**
A protocol that handles cell selection events in an `IGListBindingSectionController`.
*/
NS_SWIFT_NAME(ListBindingSectionControllerSelectionDelegate)
@protocol IGListBindingSectionControllerSelectionDelegate <NSObject>
/**
Tells the delegate that a cell at a given index was selected.
@param sectionController The section controller the selection occurred in.
@param index The index of the selected cell.
@param viewModel The view model that was bound to the cell.
*/
- (void)sectionController:(IGListBindingSectionController *)sectionController
didSelectItemAtIndex:(NSInteger)index
viewModel:(id)viewModel;
/**
Tells the delegate that a cell at a given index was deselected.
@param sectionController The section controller the deselection occurred in.
@param index The index of the deselected cell.
@param viewModel The view model that was bound to the cell.
@note Method is `@optional` until the 4.0.0 release where it will become required.
*/
@optional
- (void)sectionController:(IGListBindingSectionController *)sectionController
didDeselectItemAtIndex:(NSInteger)index
viewModel:(id)viewModel;
/**
Tells the delegate that a cell at a given index was highlighted.
@param sectionController The section controller the highlight occurred in.
@param index The index of the highlighted cell.
@param viewModel The view model that was bound to the cell.
*/
@optional
- (void)sectionController:(IGListBindingSectionController *)sectionController
didHighlightItemAtIndex:(NSInteger)index
viewModel:(id)viewModel;
/**
Tells the delegate that a cell at a given index was unhighlighted.
@param sectionController The section controller the unhighlight occurred in.
@param index The index of the unhighlighted cell.
@param viewModel The view model that was bound to the cell.
*/
@optional
- (void)sectionController:(IGListBindingSectionController *)sectionController
didUnhighlightItemAtIndex:(NSInteger)index
viewModel:(id)viewModel;
@end
NS_ASSUME_NONNULL_END