Here’s the scenario.
When a user’s login info is submitted,
activityIndicator view is shown.
This could be implemented as..
LoginViewController can possess LoadingViewController whose view is activityIndicator.
addSubview/removeFromSuperview at appropriate time.
I would normally just create a activityIndicator view programmatically and play along.
I guess the LoadingViewController could come into play when programmers want every view to be associated with an xib.
UIViewController having UIViewController seems normal?
If not, how would you handle the above case when your teammates want every view to be visible in some XIB?
UIViewControllersubviews the view of anotherUIViewControlleris normal. Your method will work.Alternatively, you can put the
ActivityIndicatorViewas subview ofLoginViewController, and hide/unhide it (hide by default). No need to create a separate view controller just for it. This is method is not good if you are very tight on memory (I have some doubt on this, though).If you are very tight on memory, just convince them to let you create it programmatically.