Let's continue the work we did in the previous post by making UITableView and UICollectionView handle cells without hassle. Elevating Reusable protocol, write extension:
From now on, UITableView will use the Reusable protocol to handle cells reusing and registering. The same can be done to collection view:
To make sure everything works as expected, the XIB file for your cell should have the same name as the cell's class name. This will ensure registering by Nib works as expected!
If you like my idea, you can find the whole code as SPM, Cocoapod, and Carthage available here.