Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
UItableView dequeueing with Swift magic
import UIKit
extension UITableView {
func dequeueReusableCell<T: UITableViewCell>() -> T {
return dequeueReusableCell(withIdentifier: NSStringFromClass(T.self)) as! T
}
}
//using: let cell: ExampleTableViewCell = tableView.dequeueReusableCell()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.