Fixed compilation under Xcode 10

This commit is contained in:
r.kuznetsov 2018-10-01 15:14:19 +03:00 committed by Daria Volvenkova
parent 63163d0661
commit 15cd0145e8
2 changed files with 4 additions and 3 deletions

View file

@ -8,13 +8,14 @@ final class BMCViewController: MWMViewController {
@IBOutlet private weak var tableView: UITableView! {
didSet {
tableView.registerNibs(cells: [
let cells = [
BMCPermissionsCell.self,
BMCPermissionsPendingCell.self,
BMCCategoryCell.self,
BMCActionsCreateCell.self,
BMCNotificationsCell.self,
])
]
tableView.registerNibs(cells)
tableView.registerNibForHeaderFooterView(BMCCategoriesHeader.self)
}
}

View file

@ -15,7 +15,7 @@ extension UITableView {
register(UINib(cell), forCellReuseIdentifier: toString(cell))
}
func registerNibs<Cell>(cells: [Cell.Type]) where Cell: UITableViewCell {
func registerNibs<Cell>(_ cells: [Cell.Type]) where Cell: UITableViewCell {
cells.forEach { registerNib(cell: $0) }
}