I have 2 UIViewControllers
which contain Tables: A
and B
.
Tapping a row in the table in A segues to B.
At the bottom of each view of A
and B
, I have a ContainerView
which points to the same UIViewController
say Z
. I use Z
to show banner-ads. The issue I have is each time my view changes (from A
to B
or B
to C
), the UIViewController
Z
gets re-instantiated as it should. But this is what I don't want. I want to use the same instance of the ContainerView everywhere. I did keep my ad-banners static so they are the same everywhere, but still managing orientation-changes and banner-views is getting messy. Also it makes the ad-banner disappear and re-appear when I switch my view, as the container-view instance is switched.
Is there a way that I can keep the same instance of the entire ContainerView
in all my UIViewControllers A
and B
and anyother viewcontrollers I add ?