coderLIfe coderLIfe - 1 year ago 103
Swift Question

How to reuse header section all scene?

I want to reuse

section all
view controller scene
.header section mean green view and label ("AMAR LIFE")

Here is my may 1st view controller scene

Here is my 1st view controller document outline


if i do not use
navigation controller
tab bar controller
. how can i reuse
section all
view controller scene
? .

enter image description here

Answer Source

Subclass UITabBarController. Make the green view a subview of the tab bar controller's main view. Whenever the selected view controller changes (or anything else happens), keep bringing the green view to the front. (Even better, make the green view a layer, not a view, and give it a higher z-position so that it automatically floats in front of all subviews.)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download