iOS UIContainerView inside a UIViewController inside a UIContainerView?

91 views Asked by At

Is it possible to have a containerView inside a containerView? If so, are there some implications to that model? I have a sidemenu in my app, so the I'm using a containerView in the classic way. The thing is that I would like to add another containerView inside a viewController inside that first containeView. I want to use that method so I can express different states of my app without having to push an entire ViewController (the changes of state in my app changes only a part the UI, the rest stays the same).

1

There are 1 answers

0
Sergii Martynenko Jr On BEST ANSWER

While container view is just simple UIView - yes, you can. It is possible to have view hierarchy as complicated, as you need. If you need separate controller for some subview - use this view controller's view as a subview (actually, all container view controllers, like UINavigationController, works this way - take view from provided view controller)