Skip to content

Instantly share code, notes, and snippets.

@ConorBrady
Created April 26, 2017 12:54
Show Gist options
  • Save ConorBrady/220e2dffb2ef9ebf1c3d87a1870fceae to your computer and use it in GitHub Desktop.
Save ConorBrady/220e2dffb2ef9ebf1c3d87a1870fceae to your computer and use it in GitHub Desktop.
extension UITableView {
public func register(_ cellClass: Swift.AnyClass) {
self.register(cellClass, forCellReuseIdentifier: String(describing: cellClass))
}
public func dequeueReusableCell<T: UITableViewCell>() -> T {
return self.dequeueReusableCell(withIdentifier: String(describing: T.self)) as! T
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment