File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 69
69
/* !
70
70
@desc Defines which sections should be open the first time the
71
71
table is shown.
72
+
73
+ Must be set before any data is loaded.
72
74
*/
73
75
@property (strong , nonatomic , nullable ) NSSet <NSNumber *> *initialOpenSections;
74
76
75
77
/* !
76
78
@desc Defines which sections will always be open.
77
79
The headers of these sections will not call the
78
80
FZAccordionTableViewDelegate methods.
81
+
82
+ Must be set before any data is loaded.
79
83
*/
80
84
@property (strong , nonatomic , nullable ) NSSet <NSNumber *> *sectionsAlwaysOpen;
81
85
Original file line number Diff line number Diff line change @@ -256,10 +256,16 @@ - (BOOL)respondsToSelector:(SEL)aSelector {
256
256
#pragma mark - Override Setters -
257
257
258
258
- (void )setInitialOpenSections : (NSSet *)initialOpenedSections {
259
+ NSAssert (self.sectionInfos.count == 0 , @" 'initialOpenedSections' MUST be set before the tableView has started loading data." );
259
260
_initialOpenSections = initialOpenedSections;
260
261
_mutableInitialOpenSections = [initialOpenedSections mutableCopy ];
261
262
}
262
263
264
+ - (void )setSectionsAlwaysOpen : (NSSet <NSNumber *> *)sectionsAlwaysOpen {
265
+ NSAssert (self.sectionInfos.count == 0 , @" 'sectionsAlwaysOpen' MUST be set before the tableView has started loading data." );
266
+ _sectionsAlwaysOpen = sectionsAlwaysOpen;
267
+ }
268
+
263
269
#pragma mark - FZAccordionTableViewHeaderViewDelegate -
264
270
265
271
- (void )tappedHeaderView : (FZAccordionTableViewHeaderView *)sectionHeaderView {
You can’t perform that action at this time.
0 commit comments