Swift add viewController as subhead for other views

I have multiple view controllers that need to load a specific view like in this picture. I have defined this view in the storyboard as a separate view controller. There reusable view controller

are some techniques that make the scan work. What's the best way to do this?

I tried using addSubview method but IBOutlets won't initialize. Please help me.

enter image description here

+3


source to share


1 answer


You probably want to use a container.



With a container view, you can embed different view controllers in the same view. Connecting them is very simple and can be done in a storyboard.

+1


source







All Articles