In my project I have different UI representations of the same model object : my entity can be represented as a table section header (UITableViewHeaderFooterView), table cell (UITableViewCell), collection section header (UICollectionReusableView) or a collection cell (UICollectionViewCell).
This representations have separate views (.xib) but they present the same object with the same behavior (UI bindings, actions, ...). For now i have a class by view (UITableViewHeaderFooterView + UITableViewCell + UICollectionReusableView + UICollectionViewCell) but i have a lot of common code to all classes.
I wonder how to gather this common behaviors in a one class in order to manage all my representations with the same class. I created a class (herited from UIView) with the common behavior but i can't use it in my Table/Collection classes since multiple inheritance is not possible.