Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Revert dequeueCell interface to return Cell (instead of Cell?) #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Frameworks/HandyUIKit/Extensions/UITableViewExt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<Cell: UITableViewCell>(ofType cellType: Cell.Type, for indexPath: IndexPath) -> Cell? {
dequeueReusableCell(withIdentifier: String(describing: cellType), for: indexPath) as? Cell
public func dequeueCell<Cell: UITableViewCell>(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.
Expand Down