deprecate some methods

This commit is contained in:
Max Sokolov 2016-10-20 12:13:30 +03:00
parent b307b2d809
commit f19b637999
2 changed files with 18 additions and 2 deletions

View File

@ -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
}
}

View File

@ -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)
}