Nicely presented article.
Since you asked for a better way, to avoid ending up with an instance of your custom class within another instance of itself, here it is:
You can just create your
CustomView class, have the master instance of it in a xib with all the subviews and outlets. Then you can apply…