deprecate some methods
This commit is contained in:
parent
b307b2d809
commit
f19b637999
|
|
@ -254,8 +254,7 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate {
|
|||
return self
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
open func delete(index: Int) -> Self {
|
||||
open func delete(sectionAt index: Int) -> Self {
|
||||
|
||||
sections.remove(at: index)
|
||||
return self
|
||||
|
|
@ -269,4 +268,14 @@ open class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate {
|
|||
|
||||
return self
|
||||
}
|
||||
|
||||
// MARK: - deprecated methods -
|
||||
|
||||
@available(*, deprecated, message: "Use 'delete(sectionAt:)' method instead")
|
||||
@discardableResult
|
||||
open func delete(index: Int) -> Self {
|
||||
|
||||
sections.remove(at: index)
|
||||
return self
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,13 @@ open class TableSection {
|
|||
rows[index] = row
|
||||
}
|
||||
|
||||
open func delete(rowAt index: Int) {
|
||||
rows.remove(at: index)
|
||||
}
|
||||
|
||||
// MARK: - deprecated methods -
|
||||
|
||||
@available(*, deprecated, message: "Use 'delete(rowAt:)' method instead")
|
||||
open func delete(index: Int) {
|
||||
rows.remove(at: index)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue