There are many different types of views that could be subclassed to make NibDesignable versions of them. The framework already includes many of them (UIView, UIControl, UITableViewCell, UITableViewHeaderFooterView, UICollectionViewCell, and UICollectionReusableView), but users may always have proprietary classes that may benefit from being subclassed.
Subclassing views within the framework is made trivial by the abstraction of NibDesignableProtocol and it's default implementation. However, the scoping of -setupNib() makes it difficult to do outside of that file. If the scope of that method were expanded to public (instead of fileprivate) it would greatly ease this task. Are there any obvious down sides to doing this?
There are many different types of views that could be subclassed to make NibDesignable versions of them. The framework already includes many of them (
UIView
,UIControl
,UITableViewCell
,UITableViewHeaderFooterView
,UICollectionViewCell
, andUICollectionReusableView
), but users may always have proprietary classes that may benefit from being subclassed.Subclassing views within the framework is made trivial by the abstraction of
NibDesignableProtocol
and it's default implementation. However, the scoping of-setupNib()
makes it difficult to do outside of that file. If the scope of that method were expanded topublic
(instead offileprivate
) it would greatly ease this task. Are there any obvious down sides to doing this?