File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ open class SPTableDiffableDataSource: UITableViewDiffableDataSource<SPDiffableSe
47
47
}
48
48
49
49
public override func tableView( _ tableView: UITableView , titleForHeaderInSection section: Int ) -> String ? {
50
- if let title = diffableDelegate? . tableView ( tableView, titleForHeaderInSection: section) {
50
+ if let title = diffableDelegate? . tableView ? ( tableView, titleForHeaderInSection: section) {
51
51
return title
52
52
}
53
53
if let header = snapshot ( ) . sectionIdentifiers [ section] . header as? SPDiffableTextHeader {
@@ -57,7 +57,7 @@ open class SPTableDiffableDataSource: UITableViewDiffableDataSource<SPDiffableSe
57
57
}
58
58
59
59
public override func tableView( _ tableView: UITableView , titleForFooterInSection section: Int ) -> String ? {
60
- if let title = diffableDelegate? . tableView ( tableView, titleForFooterInSection: section) {
60
+ if let title = diffableDelegate? . tableView ? ( tableView, titleForFooterInSection: section) {
61
61
return title
62
62
}
63
63
if let footer = snapshot ( ) . sectionIdentifiers [ section] . footer as? SPDiffableTextFooter {
@@ -67,7 +67,7 @@ open class SPTableDiffableDataSource: UITableViewDiffableDataSource<SPDiffableSe
67
67
}
68
68
69
69
public override func tableView( _ tableView: UITableView , canEditRowAt indexPath: IndexPath ) -> Bool {
70
- return diffableDelegate? . tableView ( tableView, canEditRowAt: indexPath) ?? false
70
+ return diffableDelegate? . tableView ? ( tableView, canEditRowAt: indexPath) ?? false
71
71
}
72
72
}
73
73
Original file line number Diff line number Diff line change 21
21
22
22
import UIKit
23
23
24
- public protocol SPTableDiffableDelegate : class {
24
+ @ objc public protocol SPTableDiffableDelegate : class {
25
25
26
- func tableView( _ tableView: UITableView , canEditRowAt indexPath: IndexPath ) -> Bool
26
+ @ objc optional func tableView( _ tableView: UITableView , canEditRowAt indexPath: IndexPath ) -> Bool
27
27
28
- func tableView( _ tableView: UITableView , titleForHeaderInSection section: Int ) -> String ?
28
+ @ objc optional func tableView( _ tableView: UITableView , titleForHeaderInSection section: Int ) -> String ?
29
29
30
- func tableView( _ tableView: UITableView , titleForFooterInSection section: Int ) -> String ?
30
+ @ objc optional func tableView( _ tableView: UITableView , titleForFooterInSection section: Int ) -> String ?
31
31
}
You can’t perform that action at this time.
0 commit comments