Sethmr
Sethmr

Reputation: 3074

Why does my UIStatusBar not display as desired through overriding preferredStatusBarStyle?

My status bar acts accordingly in the root controller in each tab of my UITabBarController. Once I add a modal to the UIViewController through present(viewControllerToPresent:) with .overFullscreen modalPresentationStyle it requires me to assign the preferredStatusBarStyle through the UIViewController that sent it. I need the UIViewController being presented to have a clear background and see through to the previoues UIViewControllers content. Am I doing something wrong?

Upvotes: 0

Views: 79

Answers (1)

Sethmr
Sethmr

Reputation: 3074

I solved the issue with a friend. The correct answer follows:

modalViewController.modalPresentationCapturesStatusBarAppearance = true

Upvotes: 1

Related Questions