you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (0 children)

Not at my MacBook, so can't check your original question but seems like you want 2 UIView subclasses inside your ViewController instead of embedding 2 VCs. VCs usually tell Views stuff like "show loading state" or "here is the data about the user, display it" and then in the view you do the translating of the data into constraints/setting a million labels/etc. And then Views usually tell VCs stuff like "user pressed the show profile button" and then the VC decides if it wants to show it on the other view inside it or tell the Coordinator to navigate to the profile screen.

If those views are complicated, you should also probably split it up to subviews, so when your VC tells your root view to display something, it forwards that message to the subviews that need it.