From 15cd0145e80e2199f344bc1226fe39658591b48f Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Mon, 1 Oct 2018 15:14:19 +0300 Subject: [PATCH] Fixed compilation under Xcode 10 --- .../Bookmarks/Categories/BMCView/BMCViewController.swift | 5 +++-- iphone/Maps/Categories/UITableView+Cells.swift | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/iphone/Maps/Bookmarks/Categories/BMCView/BMCViewController.swift b/iphone/Maps/Bookmarks/Categories/BMCView/BMCViewController.swift index 5d78c77ccf..6f65e55dbf 100644 --- a/iphone/Maps/Bookmarks/Categories/BMCView/BMCViewController.swift +++ b/iphone/Maps/Bookmarks/Categories/BMCView/BMCViewController.swift @@ -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) } } diff --git a/iphone/Maps/Categories/UITableView+Cells.swift b/iphone/Maps/Categories/UITableView+Cells.swift index 29e157dbd4..1835f6aae5 100644 --- a/iphone/Maps/Categories/UITableView+Cells.swift +++ b/iphone/Maps/Categories/UITableView+Cells.swift @@ -15,7 +15,7 @@ extension UITableView { register(UINib(cell), forCellReuseIdentifier: toString(cell)) } - func registerNibs(cells: [Cell.Type]) where Cell: UITableViewCell { + func registerNibs(_ cells: [Cell.Type]) where Cell: UITableViewCell { cells.forEach { registerNib(cell: $0) } }