mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Section: Add a convenient method to add an amount of rows.
This commit is contained in:
@@ -41,12 +41,18 @@ final class Section: NSObject {
|
||||
addRow(Row.row(withTag: tag))
|
||||
}
|
||||
|
||||
func addRows(withCount count: Int) {
|
||||
for i in 0..<count {
|
||||
addRow(Row.row(withTag: i))
|
||||
}
|
||||
}
|
||||
|
||||
func indexOfRow(withTag tag: Int) -> Int? {
|
||||
return rows.firstIndex(where: { $0.tag == tag })
|
||||
}
|
||||
|
||||
var hasAnyRows: Bool {
|
||||
return rows.count > 0
|
||||
return rows.isEmpty == false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user