Skip to content

Commit 271ff74

Browse files
committed
Adopted more modern objective-c to clean up the Swift interface.
1 parent 33373fa commit 271ff74

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Example/Swift/FZAccordionTableViewExample/ViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ extension ViewController : UITableViewDelegate, UITableViewDataSource {
7171

7272
extension ViewController : FZAccordionTableViewDelegate {
7373

74-
func tableView(tableView: FZAccordionTableView!, willOpenSection section: Int, withHeader header: UITableViewHeaderFooterView!) {
74+
func tableView(tableView: FZAccordionTableView, willOpenSection section: Int, withHeader header: UITableViewHeaderFooterView) {
7575

7676
}
7777

78-
func tableView(tableView: FZAccordionTableView!, didOpenSection section: Int, withHeader header: UITableViewHeaderFooterView!) {
78+
func tableView(tableView: FZAccordionTableView, didOpenSection section: Int, withHeader header: UITableViewHeaderFooterView) {
7979

8080
}
8181

82-
func tableView(tableView: FZAccordionTableView!, willCloseSection section: Int, withHeader header: UITableViewHeaderFooterView!) {
82+
func tableView(tableView: FZAccordionTableView, willCloseSection section: Int, withHeader header: UITableViewHeaderFooterView) {
8383

8484
}
8585

86-
func tableView(tableView: FZAccordionTableView!, didCloseSection section: Int, withHeader header: UITableViewHeaderFooterView!) {
86+
func tableView(tableView: FZAccordionTableView, didCloseSection section: Int, withHeader header: UITableViewHeaderFooterView) {
8787

8888
}
8989
}

FZAccordionTableView/FZAccordionTableView.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@
7070
@desc Defines which sections should be open the first time the
7171
table is shown.
7272
*/
73-
@property (strong, nonatomic) NSSet *initialOpenSections;
73+
@property (strong, nonatomic, nullable) NSSet <NSNumber *> *initialOpenSections;
7474

7575
/*!
7676
@desc Defines which sections will always be open.
7777
The headers of these sections will not call the
7878
FZAccordionTableViewDelegate methods.
7979
*/
80-
@property (strong, nonatomic) NSSet *sectionsAlwaysOpen;
80+
@property (strong, nonatomic, nullable) NSSet <NSNumber *> *sectionsAlwaysOpen;
8181

8282
/*!
8383
@desc Enables the fading of cells for the last two rows of the
@@ -110,10 +110,10 @@
110110

111111
@optional
112112

113-
- (void)tableView:(FZAccordionTableView *)tableView willOpenSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView *)header;
114-
- (void)tableView:(FZAccordionTableView *)tableView didOpenSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView *)header;
113+
- (void)tableView:(FZAccordionTableView * _Nonnull)tableView willOpenSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView * _Nonnull)header;
114+
- (void)tableView:(FZAccordionTableView * _Nonnull)tableView didOpenSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView * _Nonnull)header;
115115

116-
- (void)tableView:(FZAccordionTableView *)tableView willCloseSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView *)header;
117-
- (void)tableView:(FZAccordionTableView *)tableView didCloseSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView *)header;
116+
- (void)tableView:(FZAccordionTableView * _Nonnull)tableView willCloseSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView * _Nonnull)header;
117+
- (void)tableView:(FZAccordionTableView * _Nonnull)tableView didCloseSection:(NSInteger)section withHeader:(UITableViewHeaderFooterView * _Nonnull)header;
118118

119119
@end

0 commit comments

Comments
 (0)