I am having a hard time understanding why you can put UIViews
outside the UIViewController
on the storyboard, and what the use case of it might be.
For instance, on the storyboard I can add UIToolbar
, UIAcitivtyIndicator
and UIProgressView
that is outside of the UIViewController
. Is this mean there is a way for you to reference those Views
that are outside UIViewController
and potentially display them somehow either programmatically or embed those like you would do with a ContainerView
?
Yes, it absolutely is possible to do what you're describing!
When you add objects that are outside the view controller, they appear in what Apple calls the "Scene Dock". Apple has the following suggested usage for the scene dock:
The steps to make this work are below:
And importantly...
(These steps were originally copied from here - unfortunately this page seems to have been deleted by Apple at some point).