When you create a
UITableViewCell that you want to use with multiple
UITableViews and design its view using a XIB file you know that registering and using it involves the usage of string constants. When you register your custom
UITableViewCell with the
UITableView you use a string as XIB name and a string as the reuse identifier. Then you use the string reuse identifier again to actually use it. There must be a better, safer way, right? Of course there is, just use Reusable.
Reusable is a Swift mixin for reusing views easily and in a type-safe way for
Storyboards. It contains protocols you add to your classes and let the magic (the default implementation for those protocols) happen.
So how do you get rid of all those strings when using custom cells with
UITableView? First, add the
NibReusable protocol to you custom cell class