Please Read the question before marking it as duplicate.
I know there are a lot of questions regarding Hiding Status Bar of a View Controller
in iOS
. But none of them solves my problem.
I am using Swift - 3.0
Here is my scenario:
I am able to hide status bar on a single
UIViewController
usingprefersStatusBarHidden
computed property. So no problem with that.I have a
UIPageViewController(DetailPageViewController)
that contains severalUIViewControllers(DetailViewController)
as child controllers. In each of those child view controllers, I have anotherUIPageViewController(PhotosPageViewController)
which further contains multipleUIViewControllers(PhotoViewController)
. i.e.,
DetailPageViewController --> multiple DetailViewController
each DetailViewController --> PhotosPageViewController --> multiple PhotoViewController
So, the problem is I am not able to hide status bar of all the 4 controllers - DetailPageViewController, DetailViewController, PhotosPageViewController, PhotoViewController