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

Commit 4f9858b

Browse files
authored
Merge pull request #25 from mac-cain13/remove-dequeue
Remove dequeueReusableCell(withIdentifier:) extension method
2 parents 151210a + 27748cc commit 4f9858b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Library/UIKit/UITableView+ReuseIdentifierProtocol.swift

+2-10
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,11 @@ public extension UITableView {
2727
return dequeueReusableCell(withIdentifier: identifier.identifier, for: indexPath) as? Identifier.ReusableType
2828
}
2929

30-
/**
31-
Returns a typed reusable table-view cell object for the specified reuse identifier and adds it to the table.
32-
33-
- parameter identifier: A R.reuseIdentifier.* value identifying the cell object to be reused.
34-
35-
- returns: The UITableViewCell subclass with the associated reuse identifier or nil if it couldn't be casted correctly.
36-
37-
- precondition: You must register a class or nib file using the registerNib: or registerClass:forCellReuseIdentifier: method before calling this method.
38-
*/
30+
@available(*, unavailable, message: "Use dequeueReusableCell(withIdentifier:for:) instead")
3931
public func dequeueReusableCell<Identifier: ReuseIdentifierType>(withIdentifier identifier: Identifier) -> Identifier.ReusableType?
4032
where Identifier.ReusableType: UITableViewCell
4133
{
42-
return dequeueReusableCell(withIdentifier: identifier.identifier) as? Identifier.ReusableType
34+
fatalError()
4335
}
4436

4537
/**

0 commit comments

Comments
 (0)