Code: Custom UIView from xib

If you are building a complex view, you can break it down in parts to make more readable the code and split the functionality on different UIView classes. Then you can instantiate your subviews from your main UIViewController.