@@ -56,7 +56,11 @@ public class _TableViewSectionedDataSource
56
56
public func tableView( tableView: UITableView , titleForFooterInSection section: Int ) -> String ? {
57
57
return _rx_tableView ( tableView, titleForFooterInSection: section)
58
58
}
59
-
59
+
60
+ public var canEditRowAtIndexPathImplemented : Bool {
61
+ return false
62
+ }
63
+
60
64
func _rx_tableView( tableView: UITableView , canEditRowAtIndexPath indexPath: NSIndexPath ) -> Bool {
61
65
return true
62
66
}
@@ -95,6 +99,14 @@ public class _TableViewSectionedDataSource
95
99
public func tableView( tableView: UITableView , moveRowAtIndexPath sourceIndexPath: NSIndexPath , toIndexPath destinationIndexPath: NSIndexPath ) {
96
100
_rx_tableView ( tableView, moveRowAtIndexPath: sourceIndexPath, toIndexPath: destinationIndexPath)
97
101
}
102
+
103
+ override public func respondsToSelector( aSelector: Selector ) -> Bool {
104
+ if aSelector == #selector( UITableViewDataSource . tableView ( _: canEditRowAtIndexPath: ) ) {
105
+ return self . canEditRowAtIndexPathImplemented
106
+ }
107
+
108
+ return super. respondsToSelector ( aSelector)
109
+ }
98
110
}
99
111
100
112
public class RxTableViewSectionedDataSource < S: SectionModelType >
@@ -148,6 +160,10 @@ public class RxTableViewSectionedDataSource<S: SectionModelType>
148
160
public var titleForFooterInSection : ( ( RxTableViewSectionedDataSource < S > , section: Int ) -> String ? ) ?
149
161
150
162
public var canEditRowAtIndexPath : ( ( RxTableViewSectionedDataSource < S > , indexPath: NSIndexPath ) -> Bool ) ?
163
+ override public var canEditRowAtIndexPathImplemented : Bool {
164
+ let result = canEditRowAtIndexPath != nil
165
+ return result
166
+ }
151
167
public var canMoveRowAtIndexPath : ( ( RxTableViewSectionedDataSource < S > , indexPath: NSIndexPath ) -> Bool ) ?
152
168
153
169
public var sectionIndexTitles : ( ( RxTableViewSectionedDataSource < S > ) -> [ String ] ? ) ?
0 commit comments