|
30 | 30 |
|
31 | 31 | @interface FZAccordionTableViewHeaderView : UITableViewHeaderFooterView
|
32 | 32 |
|
33 |
| -/*! |
34 |
| - @desc The section which this header view is part of. |
35 |
| - |
36 |
| - Deprecated. Use sectionForHeaderView: instead. |
37 |
| - */ |
38 |
| -@property (nonatomic, readonly) NSInteger section DEPRECATED_MSG_ATTRIBUTE("Use sectionForHeaderView: instead."); |
39 |
| - |
40 | 33 | @end
|
41 | 34 |
|
42 | 35 | @interface FZAccordionTableView : UITableView
|
|
75 | 68 | */
|
76 | 69 | @property (strong, nonatomic, nullable) NSSet <NSNumber *> *initialOpenSections;
|
77 | 70 |
|
78 |
| -/*! |
79 |
| - @desc Defines which sections will always be open. |
80 |
| - The headers of these sections will not call the |
81 |
| - FZAccordionTableViewDelegate methods. |
82 |
| - |
83 |
| - Deprecated. Use tableView:canInteractWithHeaderAtSection: instead. |
84 |
| - */ |
85 |
| -@property (strong, nonatomic, nullable) NSSet <NSNumber *> *sectionsAlwaysOpen DEPRECATED_MSG_ATTRIBUTE("Use tableView:canInteractWithHeaderAtSection: instead."); |
86 |
| - |
87 | 71 | /*!
|
88 | 72 | @desc Enables the fading of cells for the last two rows of the
|
89 | 73 | table. The fix can remove some of the animation clunkyness
|
|
116 | 100 |
|
117 | 101 | @returns The section of the header view.
|
118 | 102 | */
|
119 |
| -- (NSInteger)sectionForHeaderView:(UITableViewHeaderFooterView * _Nonnull)headerView; |
| 103 | +- (NSInteger)sectionForHeaderView:(nonnull UITableViewHeaderFooterView *)headerView; |
120 | 104 |
|
121 | 105 | @end
|
122 | 106 |
|
| 107 | +/*! |
| 108 | + `header` can be `nil` in some of the delegate methods if the header |
| 109 | + is not visible. |
| 110 | + */ |
123 | 111 | @protocol FZAccordionTableViewDelegate <NSObject>
|
124 | 112 |
|
125 | 113 | @optional
|
126 | 114 |
|
127 |
| -/** |
| 115 | +/*! |
128 | 116 | @desc Implement to respond to which sections can be interacted with.
|
129 | 117 |
|
130 | 118 | If NO is returned for a section, the section can neither be opened or closed.
|
|
134 | 122 |
|
135 | 123 | The default return value is YES.
|
136 | 124 | */
|
137 |
| -- (BOOL)tableView:(FZAccordionTableView * _Nonnull)tableView canInteractWithHeaderAtSection:(NSInteger)section; |
| 125 | +- (BOOL)tableView:(nonnull FZAccordionTableView *)tableView canInteractWithHeaderAtSection:(NSInteger)section; |
138 | 126 |
|
139 |
| -- (void)tableView:(FZAccordionTableView * _Nonnull)tableView willOpenSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView * _Nonnull)header; |
140 |
| -- (void)tableView:(FZAccordionTableView * _Nonnull)tableView didOpenSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView * _Nonnull)header; |
| 127 | +- (void)tableView:(nonnull FZAccordionTableView *)tableView willOpenSection:(NSInteger)section withHeader:(nullable UITableViewHeaderFooterView *)header; |
| 128 | +- (void)tableView:(nonnull FZAccordionTableView *)tableView didOpenSection:(NSInteger)section withHeader:(nullable UITableViewHeaderFooterView *)header; |
141 | 129 |
|
142 |
| -- (void)tableView:(FZAccordionTableView * _Nonnull)tableView willCloseSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView * _Nonnull)header; |
143 |
| -- (void)tableView:(FZAccordionTableView * _Nonnull)tableView didCloseSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView * _Nonnull)header; |
| 130 | +- (void)tableView:(nonnull FZAccordionTableView *)tableView willCloseSection:(NSInteger)section withHeader:(nullable UITableViewHeaderFooterView *)header; |
| 131 | +- (void)tableView:(nonnull FZAccordionTableView *)tableView didCloseSection:(NSInteger)section withHeader:(nullable UITableViewHeaderFooterView *)header; |
144 | 132 |
|
145 | 133 | @end
|
0 commit comments