UItableView dequeueing with Swift magic!

PHOTO EMBED

Fri Dec 27 2019 10:53:20 GMT+0000 (Coordinated Universal Time)

Saved by @Catsndogs #ios #swift

import UIKit

extension UITableView {
    
    func dequeueReusableCell<T: UITableViewCell>() -> T {
        return dequeueReusableCell(withIdentifier: NSStringFromClass(T.self)) as! T
    }
}

//using: let cell: ExampleTableViewCell = tableView.dequeueReusableCell()
content_copyCOPY

https://gist.github.com/artemnovichkov/de5bd4daf64441c724a429d1a9b1e26e