From 840d045a464cf596dd03c9ceb580d7d535a8f825 Mon Sep 17 00:00:00 2001 From: Frederick Pietschmann <19194800+fredpi@users.noreply.github.com> Date: Sat, 4 Jul 2020 21:46:01 +0200 Subject: [PATCH] Revert dequeueCell interface to return Cell (instead of Cell?) --- Frameworks/HandyUIKit/Extensions/UITableViewExt.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Frameworks/HandyUIKit/Extensions/UITableViewExt.swift b/Frameworks/HandyUIKit/Extensions/UITableViewExt.swift index fc3c7b6..81b17ac 100644 --- a/Frameworks/HandyUIKit/Extensions/UITableViewExt.swift +++ b/Frameworks/HandyUIKit/Extensions/UITableViewExt.swift @@ -4,8 +4,9 @@ import UIKit extension UITableView { /// Returns a reusable table view cell of type `cellType` with the name of its type as reuse identifier and adds it to the table. - public func dequeueCell(ofType cellType: Cell.Type, for indexPath: IndexPath) -> Cell? { - dequeueReusableCell(withIdentifier: String(describing: cellType), for: indexPath) as? Cell + public func dequeueCell(ofType cellType: Cell.Type, for indexPath: IndexPath) -> Cell { + // swiftlint:disable:next force_cast + dequeueReusableCell(withIdentifier: String(describing: cellType), for: indexPath) as! Cell } /// Returns a reusable header or footer view of type `viewType` with the name of its type as reuse identifier and adds it to the table.