Skip to content

Commit 60a0bd3

Browse files
committed
Cleaned up deprecated methods/properties. Preparing the delegate for internal code changes around toggleSection:.
1 parent 8f09aa8 commit 60a0bd3

File tree

1 file changed

+11
-23
lines changed

1 file changed

+11
-23
lines changed

FZAccordionTableView/FZAccordionTableView.h

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@
3030

3131
@interface FZAccordionTableViewHeaderView : UITableViewHeaderFooterView
3232

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-
4033
@end
4134

4235
@interface FZAccordionTableView : UITableView
@@ -75,15 +68,6 @@
7568
*/
7669
@property (strong, nonatomic, nullable) NSSet <NSNumber *> *initialOpenSections;
7770

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-
8771
/*!
8872
@desc Enables the fading of cells for the last two rows of the
8973
table. The fix can remove some of the animation clunkyness
@@ -116,15 +100,19 @@
116100
117101
@returns The section of the header view.
118102
*/
119-
- (NSInteger)sectionForHeaderView:(UITableViewHeaderFooterView * _Nonnull)headerView;
103+
- (NSInteger)sectionForHeaderView:(nonnull UITableViewHeaderFooterView *)headerView;
120104

121105
@end
122106

107+
/*!
108+
`header` can be `nil` in some of the delegate methods if the header
109+
is not visible.
110+
*/
123111
@protocol FZAccordionTableViewDelegate <NSObject>
124112

125113
@optional
126114

127-
/**
115+
/*!
128116
@desc Implement to respond to which sections can be interacted with.
129117
130118
If NO is returned for a section, the section can neither be opened or closed.
@@ -134,12 +122,12 @@
134122
135123
The default return value is YES.
136124
*/
137-
- (BOOL)tableView:(FZAccordionTableView * _Nonnull)tableView canInteractWithHeaderAtSection:(NSInteger)section;
125+
- (BOOL)tableView:(nonnull FZAccordionTableView *)tableView canInteractWithHeaderAtSection:(NSInteger)section;
138126

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;
141129

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;
144132

145133
@end

0 commit comments

Comments
 (0)